Handle cases when git is installed but sources are not a repository clone

pull/232/head
Hleb Valoshka 2019-02-14 10:01:30 +03:00
parent 0b339f41d7
commit f089e98d83
1 changed files with 3 additions and 0 deletions

View File

@ -245,6 +245,9 @@ if (NOT GIT_COMMIT)
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
OUTPUT_VARIABLE GIT_COMMIT
)
if ("${GIT_COMMIT}" STREQUAL "")
set(GIT_COMMIT "unknown")
endif()
else()
set(GIT_COMMIT "unknown")
endif()