summaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-10-25 17:27:28 -0700
committerJosh Blum <josh@joshknows.com>2011-10-25 17:27:28 -0700
commitc463c42f343696c65d12fb1f4b5fafd5b9c59ab6 (patch)
treed1a6022d3349c3e819e897f656355d38fabb74d5 /host/lib
parent48e9a7bf202e61f35cadabddb3548ca4dda13666 (diff)
downloaduhd-c463c42f343696c65d12fb1f4b5fafd5b9c59ab6.tar.gz
uhd-c463c42f343696c65d12fb1f4b5fafd5b9c59ab6.tar.bz2
uhd-c463c42f343696c65d12fb1f4b5fafd5b9c59ab6.zip
uhd: change how we configure version.cpp
use configure_file vs defines, Possible fix for messaged up dependency/caching issue, see when changing CMakeLists, even in small ways.
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/CMakeLists.txt9
-rw-r--r--host/lib/version.cpp4
2 files changed, 6 insertions, 7 deletions
diff --git a/host/lib/CMakeLists.txt b/host/lib/CMakeLists.txt
index 60ddbce5b..2b0210e6e 100644
--- a/host/lib/CMakeLists.txt
+++ b/host/lib/CMakeLists.txt
@@ -77,11 +77,10 @@ INCLUDE_SUBDIRECTORY(utils)
########################################################################
# Setup UHD_VERSION_STRING for version.cpp
########################################################################
-SET_SOURCE_FILES_PROPERTIES(
+CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/version.cpp
- PROPERTIES COMPILE_DEFINITIONS
- "UHD_VERSION_STRING=\"${UHD_VERSION}-${UHD_BUILD_INFO}\""
-)
+ ${CMAKE_CURRENT_BINARY_DIR}/version.cpp
+@ONLY)
########################################################################
# Append to the list of sources for lib uhd
@@ -90,7 +89,7 @@ LIBUHD_APPEND_SOURCES(
${CMAKE_CURRENT_SOURCE_DIR}/device.cpp
${CMAKE_CURRENT_SOURCE_DIR}/exception.cpp
${CMAKE_CURRENT_SOURCE_DIR}/property_tree.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/version.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/version.cpp
${CMAKE_CURRENT_SOURCE_DIR}/wax.cpp
)
diff --git a/host/lib/version.cpp b/host/lib/version.cpp
index cfd198a08..6925b35bc 100644
--- a/host/lib/version.cpp
+++ b/host/lib/version.cpp
@@ -26,12 +26,12 @@ UHD_STATIC_BLOCK(print_system_info){
<< BOOST_PLATFORM << "; "
<< BOOST_COMPILER << "; "
<< "Boost_" << BOOST_VERSION << "; "
- << "UHD_" << UHD_VERSION_STRING
+ << "UHD_" << uhd::get_version_string()
<< std::endl << std::endl
;
}
#endif
std::string uhd::get_version_string(void){
- return UHD_VERSION_STRING;
+ return "@UHD_VERSION@-@UHD_BUILD_INFO@";
}