Add debug messages for git rev versioning

This commit is contained in:
John Maguire 2022-05-18 17:42:52 +01:00
parent 9be5b9805d
commit 662ac60eb1
1 changed files with 2 additions and 1 deletions

View File

@ -124,14 +124,15 @@ if(FORCE_GIT_REVISION)
set(GIT_INFO_RESULT 0)
else(FORCE_GIT_REVISION)
find_program(GIT_EXECUTABLE git)
message(STATUS "Found git: ${GIT_EXECUTABLE}")
if(NOT GIT_EXECUTABLE-NOTFOUND)
execute_process(COMMAND ${GIT_EXECUTABLE} describe
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
RESULT_VARIABLE GIT_INFO_RESULT
OUTPUT_VARIABLE GIT_REV
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE)
message(STATUS "git describe (${GIT_INFO_RESULT}) $ ${GIT_REV}")
endif()
endif()