[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 49/50: cmake: fix case for ctrlport when no
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 49/50: cmake: fix case for ctrlport when no backends installed |
Date: |
Wed, 15 Apr 2015 21:07:58 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch master
in repository gnuradio.
commit 0ab6607ffb0d45816a69c7069a1da90cc94bf047
Author: Tom Rondeau <address@hidden>
Date: Wed Apr 15 13:42:15 2015 -0700
cmake: fix case for ctrlport when no backends installed
---
CMakeLists.txt | 9 ++++++---
gnuradio-runtime/lib/controlport/CMakeLists.txt | 11 +++++++++++
gr-blocks/python/blocks/CMakeLists.txt | 6 +++---
3 files changed, 20 insertions(+), 6 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bfc0acc..e4cd18b 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 4998aeb..f0d2618 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 4497731..19d808b 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)
- [Commit-gnuradio] [gnuradio] 41/50: controlport: cmake fixes to FindThrift for when thrift is not installed., (continued)
- [Commit-gnuradio] [gnuradio] 41/50: controlport: cmake fixes to FindThrift for when thrift is not installed., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 43/50: controlport: more documentation and linking info., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 37/50: controlport: Some documentation, git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 32/50: controlport: moving the generation of the Thrift endpoint string to the application_started() function., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 42/50: controlport: QA needs to get host and port out of the endpoint., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 27/50: controlport: cleaning up; trying to handle shutdown better., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 19/50: controlport: simple style editing., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 36/50: controlport: renamed some functions for clairity, git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 50/50: Merge branch 'ctrlport', git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 26/50: docs: adding in info on ControlPort and Thrift., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 49/50: cmake: fix case for ctrlport when no backends installed,
git <=
- [Commit-gnuradio] [gnuradio] 12/50: controlport: reorg abstraction layers for RPC connections., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 46/50: controlport: avoid copy of outknobs (a temporary)., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 47/50: controlport: cleaner, more robust interface for buffer gets., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 48/50: controlport: better controlport probe mutex handling., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 44/50: docs: cleaning up some doxygen warnings and formatting., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 05/50: controlport: working gr-perf-monitorx application, git, 2015/04/16