aboutsummaryrefslogtreecommitdiffstats
path: root/host/Modules/UHDVersion.cmake
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-03-29 13:42:40 -0700
committerJosh Blum <josh@joshknows.com>2011-03-29 13:42:40 -0700
commit32357927bdc52b0cc7cd7b6d18457932aaa79682 (patch)
treef43cc6636ec3e0c56970bc5a25c50c8f476c7681 /host/Modules/UHDVersion.cmake
parenta2a78451d196a7f52a3e2a3bda94f52d127313d0 (diff)
downloaduhd-32357927bdc52b0cc7cd7b6d18457932aaa79682.tar.gz
uhd-32357927bdc52b0cc7cd7b6d18457932aaa79682.tar.bz2
uhd-32357927bdc52b0cc7cd7b6d18457932aaa79682.zip
uhd: remove build information in the version string (just major.minor.patch)
Add the build info as an additional string to the get_version function().
Diffstat (limited to 'host/Modules/UHDVersion.cmake')
-rw-r--r--host/Modules/UHDVersion.cmake14
1 files changed, 8 insertions, 6 deletions
diff --git a/host/Modules/UHDVersion.cmake b/host/Modules/UHDVersion.cmake
index dbc39b5a9..78bf7f690 100644
--- a/host/Modules/UHDVersion.cmake
+++ b/host/Modules/UHDVersion.cmake
@@ -33,12 +33,14 @@ SET(UHD_VERSION_PATCH 000)
# Version information discovery through git log
########################################################################
IF(UHD_RELEASE_MODE)
- SET(UHD_VERSION_DISCOVERY FALSE)
+ SET(UHD_BUILD_INFO_DISCOVERY FALSE)
+ SET(UHD_BUILD_INFO "release")
ELSE()
- SET(UHD_VERSION_DISCOVERY GIT_FOUND)
+ SET(UHD_BUILD_INFO_DISCOVERY GIT_FOUND)
+ SET(UHD_BUILD_INFO "unknown")
ENDIF()
-IF(UHD_VERSION_DISCOVERY)
+IF(UHD_BUILD_INFO_DISCOVERY)
#grab the git log entry for the current head
EXECUTE_PROCESS(
@@ -59,7 +61,6 @@ IF(UHD_VERSION_DISCOVERY)
COMMAND ${PYTHON_EXECUTABLE} -c "import time; print time.strftime('%Y%m%d%H%M%S', time.gmtime(${_git_timestamp}))"
OUTPUT_VARIABLE _git_date OUTPUT_STRIP_TRAILING_WHITESPACE
)
- #SET(UHD_VERSION_MINOR ${_git_date})
#grab the git ref id for the current head
EXECUTE_PROCESS(
@@ -67,8 +68,9 @@ IF(UHD_VERSION_DISCOVERY)
COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
OUTPUT_VARIABLE _git_rev OUTPUT_STRIP_TRAILING_WHITESPACE
)
- SET(UHD_VERSION_PATCH ${_git_rev})
-ENDIF(UHD_VERSION_DISCOVERY)
+
+ SET(UHD_BUILD_INFO ${_git_rev})
+ENDIF(UHD_BUILD_INFO_DISCOVERY)
########################################################################
SET(UHD_VERSION "${UHD_VERSION_MAJOR}.${UHD_VERSION_MINOR}.${UHD_VERSION_PATCH}")