From f9d5075724e833401edd8065fc05a5c0edcaef75 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Thu, 15 Jan 2015 18:09:41 +0100 Subject: cmake: Check for devel version before writing version macro --- host/cmake/Modules/UHDGlobalDefs.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'host/cmake') 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 -- cgit v1.2.3