mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Improve handling of build not in a Git repository
If Git is installed but the build is not running in a Git repository, then git rev-parse will fail and GIT_COMMIT_STRING will be empty.
This commit is contained in:
+3
-1
@@ -28,7 +28,9 @@ if(GIT_FOUND)
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE GIT_COMMIT_STRING
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
else()
|
||||
endif()
|
||||
|
||||
if(NOT GIT_COMMIT_STRING)
|
||||
set(GIT_COMMIT_STRING "unknown")
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user