summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/lib
diff options
context:
space:
mode:
authorAndrej Rode <mail@andrejro.de>2020-06-06 14:56:09 +0200
committerMartin Braun <martin@gnuradio.org>2021-01-14 10:51:47 +0100
commit14cb9a352ed4a15fed76f2494629ea2218c8d378 (patch)
tree4d9ae4530174654f33e630d583badb7052299327 /gnuradio-runtime/lib
parentc305b82062175f17342acd0983bf2e60d85a8ab2 (diff)
cmake: use TIMESTAMP function for build date and generate constants once
Previously a a custom python command was used to generate the build date but this can be done with native CMake functions for all supported CMake versions. Additionally it's compatible with reproducible builds since CMake 3.8 as it honors SOURCE_DATE_EPOCH set in the environment varibales. Thanks to Sebastian Koslowski for pointing out the right way in CMake. Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
Diffstat (limited to 'gnuradio-runtime/lib')
-rw-r--r--gnuradio-runtime/lib/CMakeLists.txt13
1 files changed, 7 insertions, 6 deletions
diff --git a/gnuradio-runtime/lib/CMakeLists.txt b/gnuradio-runtime/lib/CMakeLists.txt
index 815489108f..ec06f3fabc 100644
--- a/gnuradio-runtime/lib/CMakeLists.txt
+++ b/gnuradio-runtime/lib/CMakeLists.txt
@@ -31,6 +31,13 @@ string(REPLACE "\\" "\\\\" prefix "${prefix}")
string(REPLACE "\\" "\\\\" SYSCONFDIR "${SYSCONFDIR}")
string(REPLACE "\\" "\\\\" GR_PREFSDIR "${GR_PREFSDIR}")
+#Generate the constants file, now that we actually know which components will be enabled.
+configure_file(
+ ${CMAKE_CURRENT_SOURCE_DIR}/constants.cc.in
+ ${CMAKE_CURRENT_BINARY_DIR}/constants.cc
+ ESCAPE_QUOTES
+ @ONLY)
+
#########################################################################
# Include subdirs rather to populate to the sources lists.
########################################################################
@@ -39,12 +46,6 @@ add_subdirectory(pmt)
########################################################################
# Setup library
########################################################################
-configure_file(
- ${CMAKE_CURRENT_SOURCE_DIR}/constants.cc.in
- ${CMAKE_CURRENT_BINARY_DIR}/constants.cc
- ESCAPE_QUOTES
- @ONLY)
-
add_library(gnuradio-runtime
${CMAKE_CURRENT_BINARY_DIR}/constants.cc
basic_block.cc