[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 02/13: Helped CMake maintain a clear depend
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 02/13: Helped CMake maintain a clear dependency tree |
Date: |
Mon, 6 Mar 2017 03:30:55 +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 6be29ebd2a1a7619f71a737697f730c4145515ec
Author: Marcus Müller <address@hidden>
Date: Mon Jan 23 15:11:06 2017 +0100
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.
---
gnuradio-runtime/lib/controlport/CMakeLists.txt | 28 ++++++++---------
.../python/gnuradio/ctrlport/CMakeLists.txt | 35 ++++++++++++----------
2 files changed, 33 insertions(+), 30 deletions(-)
diff --git a/gnuradio-runtime/lib/controlport/CMakeLists.txt
b/gnuradio-runtime/lib/controlport/CMakeLists.txt
index c9bdeb9..0d5d037 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
diff --git a/gnuradio-runtime/python/gnuradio/ctrlport/CMakeLists.txt
b/gnuradio-runtime/python/gnuradio/ctrlport/CMakeLists.txt
index f40f253..be95946 100644
--- a/gnuradio-runtime/python/gnuradio/ctrlport/CMakeLists.txt
+++ b/gnuradio-runtime/python/gnuradio/ctrlport/CMakeLists.txt
@@ -50,21 +50,7 @@ GR_PYTHON_INSTALL(
if(THRIFT_FOUND)
-EXECUTE_PROCESS(
- COMMAND ${THRIFT_BIN} --gen py -out ${CMAKE_CURRENT_BINARY_DIR}/
${CMAKE_SOURCE_DIR}/gnuradio-runtime/lib/controlport/thrift/gnuradio.thrift
- OUTPUT_VARIABLE THRIFT_PY_OUTPUT
- ERROR_VARIABLE THRIFT_PY_ERROR
- )
-
-GR_PYTHON_INSTALL(
- FILES
- ${CMAKE_CURRENT_SOURCE_DIR}/RPCConnectionThrift.py
- DESTINATION ${GR_PYTHON_DIR}/gnuradio/ctrlport/
- COMPONENT "runtime_python"
-)
-
-GR_PYTHON_INSTALL(
- FILES
+ list(APPEND thrift_targets
${CMAKE_CURRENT_BINARY_DIR}/GNURadio/__init__.py
${CMAKE_CURRENT_BINARY_DIR}/GNURadio/constants.py
${CMAKE_CURRENT_BINARY_DIR}/GNURadio/ControlPort.py
@@ -72,8 +58,25 @@ GR_PYTHON_INSTALL(
${CMAKE_CURRENT_BINARY_DIR}/GNURadio/StreamReceiver.py
${CMAKE_CURRENT_BINARY_DIR}/GNURadio/StreamReceiver-remote
${CMAKE_CURRENT_BINARY_DIR}/GNURadio/ttypes.py
+ )
+ add_custom_command(
+ DEPENDS
${CMAKE_SOURCE_DIR}/gnuradio-runtime/lib/controlport/thrift/gnuradio.thrift
+ OUTPUT ${thrift_targets}
+ COMMAND ${THRIFT_BIN} --gen py -out ${CMAKE_CURRENT_BINARY_DIR}/
${CMAKE_SOURCE_DIR}/gnuradio-runtime/lib/controlport/thrift/gnuradio.thrift
+ )
+
+ GR_PYTHON_INSTALL(
+ FILES
+ ${CMAKE_CURRENT_SOURCE_DIR}/RPCConnectionThrift.py
+ DESTINATION ${GR_PYTHON_DIR}/gnuradio/ctrlport/
+ COMPONENT "runtime_python"
+ )
+
+ GR_PYTHON_INSTALL(
+ FILES
+ ${thrift_targets}
DESTINATION ${GR_PYTHON_DIR}/gnuradio/ctrlport/GNURadio
COMPONENT "runtime_python"
-)
+ )
endif(THRIFT_FOUND)
- [Commit-gnuradio] [gnuradio] 07/13: uhd: Always query current frequency when outputting tags, (continued)
- [Commit-gnuradio] [gnuradio] 07/13: uhd: Always query current frequency when outputting tags, git, 2017/03/05
- [Commit-gnuradio] [gnuradio] 11/13: Merge remote-tracking branch 'drmpeg/dvbt2-refactor', git, 2017/03/05
- [Commit-gnuradio] [gnuradio] 01/13: gr-uhd: select time/clock-sources in uhd_app per motherboard, cleanup normalize_sel code, git, 2017/03/05
- [Commit-gnuradio] [gnuradio] 12/13: Merge remote-tracking branch 'mbr0wn/uhd/fix_center_freq', git, 2017/03/05
- [Commit-gnuradio] [gnuradio] 10/13: Merge remote-tracking branch 'michaelld/blocks_swig_split_2', git, 2017/03/05
- [Commit-gnuradio] [gnuradio] 08/13: Merge remote-tracking branch 'noc0lour/uhd_app_norm_sel', git, 2017/03/05
- [Commit-gnuradio] [gnuradio] 13/13: Merge remote-tracking branch 'ejk43/uhd-fft-fixbandwidth', git, 2017/03/05
- [Commit-gnuradio] [gnuradio] 09/13: Merge remote-tracking branch 'mmueller/cmake_dependency_tree', git, 2017/03/05
- [Commit-gnuradio] [gnuradio] 04/13: Refactor DVB-T2 modulator block., git, 2017/03/05
- [Commit-gnuradio] [gnuradio] 05/13: Update DVB-T2 modulator copyright date., git, 2017/03/05
- [Commit-gnuradio] [gnuradio] 02/13: Helped CMake maintain a clear dependency tree,
git <=
- [Commit-gnuradio] [gnuradio] 06/13: uhd_fft: Added abs(lo_offset) correction to set_bandwidth command so we dont filter out signal of interest, git, 2017/03/05
- [Commit-gnuradio] [gnuradio] 03/13: blocks: swig: increase split from 5 to 10, to do a native build on low memory systems (e.g., RPi). Amazingly, the single new block added in b49f52f9 broke native build, so the prior split was fragile. This new spit leaves a significant margin for adding new blocks here and there without breaking native builds on low memory systems., git, 2017/03/05