diff options
author | Martin Braun <martin.braun@ettus.com> | 2015-01-15 18:09:41 +0100 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2015-01-15 18:09:59 +0100 |
commit | f9d5075724e833401edd8065fc05a5c0edcaef75 (patch) | |
tree | 2f06740c8a6ca54f2daa985cfa4d9eda53f2fd7f /host | |
parent | b60704d8b7ce4172d5b5a3ba930301258d846a48 (diff) | |
download | uhd-f9d5075724e833401edd8065fc05a5c0edcaef75.tar.gz uhd-f9d5075724e833401edd8065fc05a5c0edcaef75.tar.bz2 uhd-f9d5075724e833401edd8065fc05a5c0edcaef75.zip |
cmake: Check for devel version before writing version macro
Diffstat (limited to 'host')
-rw-r--r-- | host/cmake/Modules/UHDGlobalDefs.cmake | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/host/cmake/Modules/UHDGlobalDefs.cmake b/host/cmake/Modules/UHDGlobalDefs.cmake index b4c0173ea..4edd03c6b 100644 --- a/host/cmake/Modules/UHDGlobalDefs.cmake +++ b/host/cmake/Modules/UHDGlobalDefs.cmake @@ -23,7 +23,11 @@ INCLUDE(CheckCXXSymbolExists) CHECK_CXX_SYMBOL_EXISTS("log2" "cmath" HAVE_LOG2) ## Macros for the version number -MATH(EXPR UHD_VERSION_ADDED "10000 * ${TRIMMED_VERSION_MAJOR} + 100 * ${TRIMMED_VERSION_MINOR} + ${TRIMMED_VERSION_PATCH}") +IF(UHD_VERSION_DEVEL) + MATH(EXPR UHD_VERSION_ADDED "10000 * ${TRIMMED_VERSION_MAJOR} + 100 * ${TRIMMED_VERSION_MINOR} + 99") +ELSE() + MATH(EXPR UHD_VERSION_ADDED "10000 * ${TRIMMED_VERSION_MAJOR} + 100 * ${TRIMMED_VERSION_MINOR} + ${TRIMMED_VERSION_PATCH}") +ENDIF(UHD_VERSION_DEVEL) ADD_DEFINITIONS(-DUHD_VERSION=${UHD_VERSION_ADDED}) ## make sure the code knows about config.h |