summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2012-11-13 15:00:57 -0800
committerJosh Blum <josh@joshknows.com>2012-11-13 15:00:57 -0800
commitb65a3924808b48e170042f1f8ca416bd985a852f (patch)
tree4564ad7efae3ea2609836076040d14edb71960ec
parenta288d3bb2fd570401618085fec5dde42ae7e3ce7 (diff)
parentf5a0656bf290c9caa49c341acf20034990919b12 (diff)
downloaduhd-b65a3924808b48e170042f1f8ca416bd985a852f.tar.gz
uhd-b65a3924808b48e170042f1f8ca416bd985a852f.tar.bz2
uhd-b65a3924808b48e170042f1f8ca416bd985a852f.zip
Merge branch 'maint'
-rw-r--r--host/cmake/Modules/UHDVersion.cmake10
1 files changed, 9 insertions, 1 deletions
diff --git a/host/cmake/Modules/UHDVersion.cmake b/host/cmake/Modules/UHDVersion.cmake
index 6b1d84941..faa686710 100644
--- a/host/cmake/Modules/UHDVersion.cmake
+++ b/host/cmake/Modules/UHDVersion.cmake
@@ -65,10 +65,18 @@ ENDIF()
IF(UHD_RELEASE_MODE)
SET(UHD_GIT_HASH ${UHD_RELEASE_MODE})
+
+ #Ignore UHD_GIT_COUNT in UHD_VERSION if the string 'release' is in UHD_RELEASE_MODE
+ EXECUTE_PROCESS(
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+ COMMAND ${PYTHON_EXECUTABLE} -c "print 'release' in '${UHD_RELEASE_MODE}'"
+ OUTPUT_VARIABLE TRIM_UHD_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
ENDIF()
+
########################################################################
-IF(UHD_RELEASE_MODE STREQUAL "release")
+IF(TRIM_UHD_VERSION STREQUAL "True")
SET(UHD_VERSION "${UHD_VERSION_MAJOR}.${UHD_VERSION_MINOR}.${UHD_VERSION_PATCH}-${UHD_GIT_HASH}")
ELSE()
SET(UHD_VERSION "${UHD_VERSION_MAJOR}.${UHD_VERSION_MINOR}.${UHD_VERSION_PATCH}-${UHD_GIT_COUNT}-${UHD_GIT_HASH}")