Skip to content

Commit

Permalink
fix for CMake out of source builds not getting Git revision
Browse files Browse the repository at this point in the history
Signed-off-by: Steffen Pankratz <[email protected]>

Original warning:
fatal: not a git repository (or any of the parent directories): .git
  • Loading branch information
kratz00 committed Mar 20, 2021
1 parent bd72da2 commit 049e70b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 049e70b

Please sign in to comment.