summaryrefslogtreecommitdiffstats
path: root/host/cmake/Modules/UHDVersion.cmake
diff options
context:
space:
mode:
authorNicholas Corgan <nick.corgan@ettus.com>2014-04-30 12:39:50 -0700
committerNicholas Corgan <nick.corgan@ettus.com>2014-04-30 12:39:50 -0700
commit63edfdf43051900c81d4e531ac852edeeb7a95ab (patch)
treeddedeae7cd30d9ced8fc595f52cc28754af81bd0 /host/cmake/Modules/UHDVersion.cmake
parenta5d18ee206bebf66952f697c5387c0d1555fd2f3 (diff)
downloaduhd-63edfdf43051900c81d4e531ac852edeeb7a95ab.tar.gz
uhd-63edfdf43051900c81d4e531ac852edeeb7a95ab.tar.bz2
uhd-63edfdf43051900c81d4e531ac852edeeb7a95ab.zip
cmake: fix UHD_VERSION determination when most recent tag contains hyphens
Diffstat (limited to 'host/cmake/Modules/UHDVersion.cmake')
-rw-r--r--host/cmake/Modules/UHDVersion.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/host/cmake/Modules/UHDVersion.cmake b/host/cmake/Modules/UHDVersion.cmake
index 0fc12d257..00b3029ea 100644
--- a/host/cmake/Modules/UHDVersion.cmake
+++ b/host/cmake/Modules/UHDVersion.cmake
@@ -63,12 +63,12 @@ EXECUTE_PROCESS(
IF(_git_describe_result EQUAL 0)
EXECUTE_PROCESS(
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
- COMMAND ${PYTHON_EXECUTABLE} -c "print '${_git_describe}'.split('-')[1]"
+ COMMAND ${PYTHON_EXECUTABLE} -c "print '${_git_describe}'.split('-')[-2]"
OUTPUT_VARIABLE UHD_GIT_COUNT OUTPUT_STRIP_TRAILING_WHITESPACE
)
EXECUTE_PROCESS(
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
- COMMAND ${PYTHON_EXECUTABLE} -c "print '${_git_describe}'.split('-')[2]"
+ COMMAND ${PYTHON_EXECUTABLE} -c "print '${_git_describe}'.split('-')[-1]"
OUTPUT_VARIABLE UHD_GIT_HASH OUTPUT_STRIP_TRAILING_WHITESPACE
)
ENDIF()