forked from Mirrors/openclonk
Fix error condition in cmake's git_get_changeset_id
parent
8c3e78cee4
commit
2a68766856
|
@ -23,7 +23,14 @@ function(git_get_changeset_id VAR)
|
|||
LIMIT_COUNT 1
|
||||
REGEX "node: [0-9a-f]+"
|
||||
)
|
||||
string(SUBSTRING "${C4REVISION}" 6 12 C4REVISION)
|
||||
string(LENGTH "${C4REVISION}" revlength)
|
||||
if(revlength LESS 18)
|
||||
set(C4REVISION "unknown")
|
||||
message(WARNING "Could not retrieve git revision. Please set GIT_EXECUTABLE!")
|
||||
else()
|
||||
string(SUBSTRING "${C4REVISION}" 6 12 C4REVISION)
|
||||
endif()
|
||||
unset(revlength)
|
||||
endif()
|
||||
if(WORKDIR_DIRTY)
|
||||
set(C4REVISION "${C4REVISION}+")
|
||||
|
|
Loading…
Reference in New Issue