Fix git hash detection for release builds

This commit is contained in:
Martin Natano
2023-03-25 23:02:32 +01:00
parent 1b24361cf3
commit 870cfde566
2 changed files with 8 additions and 2 deletions
+7 -2
View File
@@ -17,8 +17,13 @@ if(NOT (ret STREQUAL "0"))
"git was not found on your path. If you collect bug reports, please add git to your path and rerun cmake."
)
set(SM_VERSION_GIT_HASH "UNKNOWN")
set(SM_VERSION_GIT
"${SM_VERSION_MAJOR}.${SM_VERSION_MINOR}.${SM_VERSION_PATCH}-${SM_VERSION_GIT_HASH}")
if(WITH_FULL_RELEASE)
set(SM_VERSION_GIT
"${SM_VERSION_MAJOR}.${SM_VERSION_MINOR}.${SM_VERSION_PATCH}")
else()
set(SM_VERSION_GIT
"${SM_VERSION_MAJOR}.${SM_VERSION_MINOR}.${SM_VERSION_PATCH}-${SM_VERSION_GIT_HASH}")
endif()
else()
if(WITH_FULL_RELEASE)
set(SM_VERSION_GIT