diff options
-rw-r--r-- | CMakeLists.txt | 9 | ||||
-rw-r--r-- | gnuradio-runtime/lib/controlport/CMakeLists.txt | 11 | ||||
-rw-r--r-- | gr-blocks/python/blocks/CMakeLists.txt | 6 |
3 files changed, 20 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index bfc0accba3..e4cd18b774 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -408,10 +408,13 @@ if(ENABLE_GR_CTRLPORT) set(GR_CTRLPORT True) add_definitions(-DGR_CTRLPORT) - if(THRIFT_FOUND) + if(CTRLPORT_BACKENDS GREATER 0) set(GR_RPCSERVER_ENABLED True) - set(GR_RPCSERVER_THRIFT True) - endif(THRIFT_FOUND) + + if(THRIFT_FOUND) + set(GR_RPCSERVER_THRIFT True) + endif(THRIFT_FOUND) + endif(CTRLPORT_BACKENDS GREATER 0) endif(ENABLE_GR_CTRLPORT) # Install our Cmake modules into $prefix/lib/cmake/gnuradio diff --git a/gnuradio-runtime/lib/controlport/CMakeLists.txt b/gnuradio-runtime/lib/controlport/CMakeLists.txt index 4998aebec6..f0d2618c01 100644 --- a/gnuradio-runtime/lib/controlport/CMakeLists.txt +++ b/gnuradio-runtime/lib/controlport/CMakeLists.txt @@ -19,6 +19,9 @@ if(ENABLE_GR_CTRLPORT) +# Keep track of the number of backends ControlPort supports +SET(CTRLPORT_BACKENDS 0) + # Add definition so we can compile in ControlPort to the blocks. add_definitions(-DGR_CTRLPORT) @@ -41,6 +44,8 @@ FIND_PACKAGE(Thrift) if(THRIFT_FOUND) +MATH(EXPR CTRLPORT_BACKENDS "${CTRLPORT_BACKENDS} + 1") + # Indicate thrift as an installed backend in the cmake summary. message(STATUS "Found and enabling Thrift backend to ControlPort") GR_APPEND_SUBCOMPONENT("thrift") @@ -90,4 +95,10 @@ endif(ENABLE_CTRLPORT_THRIFT) include_directories(${CMAKE_CURRENT_BINARY_DIR}) +# Save the number of backends for testing against later +set( + CTRLPORT_BACKENDS ${CTRLPORT_BACKENDS} + CACHE INTERNAL "Number of ControlPort backends available" +) + endif(ENABLE_GR_CTRLPORT) diff --git a/gr-blocks/python/blocks/CMakeLists.txt b/gr-blocks/python/blocks/CMakeLists.txt index 44977313cf..19d808b1dd 100644 --- a/gr-blocks/python/blocks/CMakeLists.txt +++ b/gr-blocks/python/blocks/CMakeLists.txt @@ -43,14 +43,14 @@ if(ENABLE_TESTING) include(GrTest) file(GLOB py_qa_test_files "qa_*.py") - # Force out the controlport QA tests if we've disabled it. - if(NOT ENABLE_GR_CTRLPORT) + # Force out the controlport QA tests if we have no backends to use. + if(CTRLPORT_BACKENDS EQUAL 0) list(REMOVE_ITEM py_qa_test_files ${CMAKE_CURRENT_SOURCE_DIR}/qa_cpp_py_binding.py ${CMAKE_CURRENT_SOURCE_DIR}/qa_cpp_py_binding_set.py ${CMAKE_CURRENT_SOURCE_DIR}/qa_ctrlport_probes.py ) - endif(NOT ENABLE_GR_CTRLPORT) + endif(CTRLPORT_BACKENDS EQUAL 0) foreach(py_qa_test_file ${py_qa_test_files}) get_filename_component(py_qa_test_name ${py_qa_test_file} NAME_WE) |