diff options
author | Nicholas Corgan <nick.corgan@ettus.com> | 2012-11-12 15:52:44 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2012-11-13 14:59:56 -0800 |
commit | 5d3d9a741c8780ce97d104366ca310be7a6e7d5d (patch) | |
tree | 781a15547610d2cf59cd61c462235b3bdf09fe27 /host/cmake | |
parent | 8ea5966f7abbfcc12ec38a3d4532929762c80064 (diff) | |
download | uhd-5d3d9a741c8780ce97d104366ca310be7a6e7d5d.tar.gz uhd-5d3d9a741c8780ce97d104366ca310be7a6e7d5d.tar.bz2 uhd-5d3d9a741c8780ce97d104366ca310be7a6e7d5d.zip |
cmake: UHD_VERSION ignores GIT_COUNT if the string 'release' is in UHD_RELEASE_MODE rather than equaling 'release'
Diffstat (limited to 'host/cmake')
-rw-r--r-- | host/cmake/Modules/UHDVersion.cmake | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/host/cmake/Modules/UHDVersion.cmake b/host/cmake/Modules/UHDVersion.cmake index 414990995..0445821cd 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}") |