summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Blum2011-09-17 10:52:57 -0400
committerJosh Blum2011-09-17 10:52:57 -0400
commit45b4f703ae4e3871f233b76d3114630e2e4c527d (patch)
tree3bf115f1f96e13aa806cc61ae1124b6c7450c8ea
parentcdc6339e5acef2755f25a92bd4c2587df9a75619 (diff)
downloadgnuradio-45b4f703ae4e3871f233b76d3114630e2e4c527d.tar.gz
gnuradio-45b4f703ae4e3871f233b76d3114630e2e4c527d.tar.bz2
gnuradio-45b4f703ae4e3871f233b76d3114630e2e4c527d.zip
volk: check that python -B can be used
-rw-r--r--volk/lib/CMakeLists.txt12
1 files changed, 11 insertions, 1 deletions
diff --git a/volk/lib/CMakeLists.txt b/volk/lib/CMakeLists.txt
index c8b9449a6..d24c22c2c 100644
--- a/volk/lib/CMakeLists.txt
+++ b/volk/lib/CMakeLists.txt
@@ -168,10 +168,20 @@ FILE(GLOB xml_files ${CMAKE_SOURCE_DIR}/gen/*.xml)
FILE(GLOB py_files ${CMAKE_SOURCE_DIR}/gen/*.py)
FILE(GLOB h_files ${CMAKE_SOURCE_DIR}/include/volk/*.h)
+#make sure we can use -B with python (introduced in 2.6)
+EXECUTE_PROCESS(
+ COMMAND ${PYTHON_EXECUTABLE} -B -c ""
+ OUTPUT_QUIET ERROR_QUIET
+ RESULT_VARIABLE PYTHON_HAS_DASH_B_RESULT
+)
+IF(PYTHON_HAS_DASH_B_RESULT EQUAL 0)
+ SET(PYTHON_DASH_B "-B")
+ENDIF()
+
ADD_CUSTOM_COMMAND(
OUTPUT ${volk_gen_sources}
DEPENDS ${xml_files} ${py_files} ${h_files}
- COMMAND ${PYTHON_EXECUTABLE} -B
+ COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
${CMAKE_SOURCE_DIR}/gen/volk_register.py
${CMAKE_BINARY_DIR}
)