Skip to content

Commit

Permalink
Fix git release define when building out of source
Browse files Browse the repository at this point in the history
  • Loading branch information
multiplemonomials committed Jan 15, 2023
1 parent 1c88a7d commit 6cef11a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion host/cmake/set_release.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
if(NOT DEFINED RELEASE)
execute_process(
COMMAND git log -n 1 --format=%h
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
RESULT_VARIABLE GIT_EXIT_VALUE
ERROR_QUIET
OUTPUT_VARIABLE GIT_VERSION
Expand All @@ -12,6 +12,7 @@ if(NOT DEFINED RELEASE)
else (GIT_EXIT_VALUE)
execute_process(
COMMAND git status -s --untracked-files=no
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE DIRTY
)
if ( NOT "${DIRTY}" STREQUAL "" )
Expand Down

0 comments on commit 6cef11a

Please sign in to comment.