summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/lib/controlport
diff options
context:
space:
mode:
authorMarcus Müller <marcus@hostalia.de>2017-01-23 15:11:06 +0100
committerMarcus Müller <marcus@hostalia.de>2017-01-23 15:11:06 +0100
commit6be29ebd2a1a7619f71a737697f730c4145515ec (patch)
treed44b06261c3ed0131d87e71efc6478cf383185d5 /gnuradio-runtime/lib/controlport
parent6225e5d4d1edd67c896c6c43bdc584a078480a8d (diff)
Helped CMake maintain a clear dependency tree
by converting EXECUTE_COMMAND directives to add_custom_command with well-defined OUTPUT. This is all that was necessary to make GNU Radio build with Ninja in place of GNU Make.
Diffstat (limited to 'gnuradio-runtime/lib/controlport')
-rw-r--r--gnuradio-runtime/lib/controlport/CMakeLists.txt28
1 files changed, 14 insertions, 14 deletions
diff --git a/gnuradio-runtime/lib/controlport/CMakeLists.txt b/gnuradio-runtime/lib/controlport/CMakeLists.txt
index c9bdeb949e..0d5d0376cc 100644
--- a/gnuradio-runtime/lib/controlport/CMakeLists.txt
+++ b/gnuradio-runtime/lib/controlport/CMakeLists.txt
@@ -51,28 +51,28 @@ MATH(EXPR CTRLPORT_BACKENDS "${CTRLPORT_BACKENDS} + 1")
message(STATUS "Found and enabling Thrift backend to ControlPort")
GR_APPEND_SUBCOMPONENT("thrift")
-# Run Thrrift To compile C++ and Python files
+# Run Thrift To compile C++ and Python files
message(STATUS "Running thrift to build C++ bindings")
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/thrift/)
-EXECUTE_PROCESS(
- COMMAND ${THRIFT_BIN} --gen cpp -out ${CMAKE_CURRENT_BINARY_DIR}/thrift/ ${CMAKE_CURRENT_SOURCE_DIR}/thrift/gnuradio.thrift
- OUTPUT_VARIABLE THRIFT_CPP_OUTPUT
- ERROR_VARIABLE THRIFT_CPP_ERROR
- )
+list(APPEND gnuradio_thrift_generated_sources
+ ${CMAKE_CURRENT_BINARY_DIR}/thrift/gnuradio_types.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/thrift/gnuradio_constants.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/thrift/ControlPort.cpp
+ )
+add_custom_command(
+ DEPENDS ${CMAKE_SOURCE_DIR}/gnuradio-runtime/lib/controlport/thrift/gnuradio.thrift
+ OUTPUT ${gnuradio_thrift_generated_sources}
+ COMMAND ${THRIFT_BIN} --gen cpp -out ${CMAKE_CURRENT_BINARY_DIR}/thrift/ ${CMAKE_CURRENT_SOURCE_DIR}/thrift/gnuradio.thrift
+ )
list(APPEND gnuradio_ctrlport_sources
${CMAKE_CURRENT_SOURCE_DIR}/thrift/rpcserver_thrift.cc
${CMAKE_CURRENT_SOURCE_DIR}/thrift/rpcpmtconverters_thrift.cc
${CMAKE_CURRENT_SOURCE_DIR}/thrift/rpcserver_booter_thrift.cc
${CMAKE_CURRENT_SOURCE_DIR}/thrift/thrift_application_base.cc
-)
-
-# add files built by compiling gnuradio.thrift
-list(APPEND gnuradio_ctrlport_sources
- ${CMAKE_CURRENT_BINARY_DIR}/thrift/gnuradio_types.cpp
- ${CMAKE_CURRENT_BINARY_DIR}/thrift/gnuradio_constants.cpp
- ${CMAKE_CURRENT_BINARY_DIR}/thrift/ControlPort.cpp
-)
+ # add files built by compiling gnuradio.thrift
+ ${gnuradio_thrift_generated_sources}
+ )
# Add required libraries here
list(APPEND gnuradio_runtime_libs