aboutsummaryrefslogtreecommitdiffstats
path: root/host/cmake/Modules
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2017-05-03 15:59:47 -0700
committerMartin Braun <martin.braun@ettus.com>2017-05-03 15:59:47 -0700
commitc3beb6d1ec2f11ab4d8153b43396d07127cd4f20 (patch)
treecb71d69a3ff09f6c81cf6454d4dd1bb33a2a1382 /host/cmake/Modules
parent15f0140cd715900b3950b477fb156b0435235c4a (diff)
parente6c8cee6e9e6dbe257bc6a77899306e611d44d71 (diff)
downloaduhd-c3beb6d1ec2f11ab4d8153b43396d07127cd4f20.tar.gz
uhd-c3beb6d1ec2f11ab4d8153b43396d07127cd4f20.tar.bz2
uhd-c3beb6d1ec2f11ab4d8153b43396d07127cd4f20.zip
Merge branch 'maint'
Diffstat (limited to 'host/cmake/Modules')
-rw-r--r--host/cmake/Modules/UHDVersion.cmake24
1 files changed, 14 insertions, 10 deletions
diff --git a/host/cmake/Modules/UHDVersion.cmake b/host/cmake/Modules/UHDVersion.cmake
index 0e8064ff3..d557fdd29 100644
--- a/host/cmake/Modules/UHDVersion.cmake
+++ b/host/cmake/Modules/UHDVersion.cmake
@@ -87,26 +87,30 @@ EXECUTE_PROCESS(
#only set the build info on success
IF(_git_describe_result EQUAL 0)
- EXECUTE_PROCESS(
- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
- COMMAND ${PYTHON_EXECUTABLE} -c "
+ IF(NOT UHD_GIT_COUNT)
+ EXECUTE_PROCESS(
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+ COMMAND ${PYTHON_EXECUTABLE} -c "
try:
print('${_git_describe}'.split('-')[-2])
except IndexError:
print('0')
"
- OUTPUT_VARIABLE UHD_GIT_COUNT OUTPUT_STRIP_TRAILING_WHITESPACE
- )
- EXECUTE_PROCESS(
- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
- COMMAND ${PYTHON_EXECUTABLE} -c "
+ OUTPUT_VARIABLE UHD_GIT_COUNT OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+ ENDIF()
+ IF(NOT UHD_GIT_HASH)
+ EXECUTE_PROCESS(
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+ COMMAND ${PYTHON_EXECUTABLE} -c "
try:
print('${_git_describe}'.split('-')[-1])
except IndexError:
print('unknown')
"
- OUTPUT_VARIABLE UHD_GIT_HASH OUTPUT_STRIP_TRAILING_WHITESPACE
- )
+ OUTPUT_VARIABLE UHD_GIT_HASH OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+ ENDIF()
ENDIF()
## Set default values if all fails. Make sure they're identical to the ones above.