diff options
Diffstat (limited to 'host/cmake/Modules/UHDVersion.cmake')
-rw-r--r-- | host/cmake/Modules/UHDVersion.cmake | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/host/cmake/Modules/UHDVersion.cmake b/host/cmake/Modules/UHDVersion.cmake index 3a39a40cf..eff705571 100644 --- a/host/cmake/Modules/UHDVersion.cmake +++ b/host/cmake/Modules/UHDVersion.cmake @@ -38,7 +38,7 @@ endif(NOT DEFINED UHD_VERSION_DEVEL) set(UHD_GIT_BRANCH "") if(GIT_FOUND) execute_process( - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + WORKING_DIRECTORY ${UHD_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD OUTPUT_VARIABLE _git_branch OUTPUT_STRIP_TRAILING_WHITESPACE RESULT_VARIABLE _git_branch_result @@ -77,7 +77,7 @@ endif(DEFINED UHD_GIT_BRANCH_OVERRIDE) #grab the git ref id for the current head execute_process( - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + WORKING_DIRECTORY ${UHD_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} describe --always --abbrev=8 --long OUTPUT_VARIABLE _git_describe OUTPUT_STRIP_TRAILING_WHITESPACE RESULT_VARIABLE _git_describe_result @@ -87,7 +87,7 @@ execute_process( if(_git_describe_result EQUAL 0) if(NOT UHD_GIT_COUNT) execute_process( - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + WORKING_DIRECTORY ${UHD_SOURCE_DIR} COMMAND ${PYTHON_EXECUTABLE} -c " try: print('${_git_describe}'.split('-')[-2]) @@ -99,7 +99,7 @@ except IndexError: endif() if(NOT UHD_GIT_HASH) execute_process( - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + WORKING_DIRECTORY ${UHD_SOURCE_DIR} COMMAND ${PYTHON_EXECUTABLE} -c " try: print('${_git_describe}'.split('-')[-1]) @@ -125,7 +125,7 @@ if(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} + WORKING_DIRECTORY ${UHD_SOURCE_DIR} COMMAND ${PYTHON_EXECUTABLE} -c "print ('release' in '${UHD_RELEASE_MODE}') or ('rc' in '${UHD_RELEASE_MODE}')" OUTPUT_VARIABLE TRIM_UHD_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE ) |