fix for CMake out of source builds not getting Git revision

Signed-off-by: Steffen Pankratz <kratz00@gmx.de>

Original warning:
fatal: not a git repository (or any of the parent directories): .git
This commit is contained in:
Steffen Pankratz
2021-03-20 14:05:06 +01:00
parent bd72da276e
commit 049e70bea8
+2 -1
View File
@@ -25,7 +25,8 @@ execute_process(COMMAND echo -n ${VERSION}
execute_process(COMMAND git describe --always
OUTPUT_VARIABLE REVISION
OUTPUT_STRIP_TRAILING_WHITESPACE)
OUTPUT_STRIP_TRAILING_WHITESPACE
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
if(NOT REVISION)
execute_process(COMMAND date +p%Y%m%d
OUTPUT_VARIABLE REVISION