Skip to content
Snippets Groups Projects
Unverified Commit 997c3dc6 authored by bunnei's avatar bunnei Committed by GitHub
Browse files

Merge pull request #1619 from janisozaur/patch-12

Handle missing git info when building
parents 11a14422 44c80e5d
No related branches found
No related tags found
No related merge requests found
......@@ -33,6 +33,10 @@ else()
endif()
if(NOT HEAD_HASH)
file(READ "@GIT_DATA@/head-ref" HEAD_HASH LIMIT 1024)
string(STRIP "${HEAD_HASH}" HEAD_HASH)
if(EXISTS "@GIT_DATA@/head-ref")
file(READ "@GIT_DATA@/head-ref" HEAD_HASH LIMIT 1024)
string(STRIP "${HEAD_HASH}" HEAD_HASH)
else()
set(HEAD_HASH "Unknown")
endif()
endif()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment