Adding Git Hash to build name.

This commit is contained in:
stephb9959
2021-12-06 20:42:24 -08:00
parent 277b2dbd76
commit 62319317a1

View File

@@ -26,8 +26,10 @@ else()
endif()
find_package(Git QUIET)
if(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git")
execute_process(COMMAND ${GIT_EXECUTABLE} describe --always --tags
#if(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git")
if(EXISTS "${PROJECT_SOURCE_DIR}/.git")
# execute_process(COMMAND ${GIT_EXECUTABLE} describe --always --tags
execute_process(COMMAND git describe --always --tags
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
RESULT_VARIABLE GIT_RESULT
OUTPUT_VARIABLE GIT_HASH)