fixed a bug for out-of-repo build to generate git-info.
This commit is contained in:
parent
9e8f22f629
commit
2f6f3a6874
@ -9,7 +9,7 @@ set(MUSRFIT_VERSION "@MUSRFIT_VERSION@")
|
||||
# Get the current working branch
|
||||
execute_process(
|
||||
COMMAND git rev-parse --abbrev-ref HEAD
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
WORKING_DIRECTORY ${SRC_DIR}
|
||||
OUTPUT_VARIABLE GIT_BRANCH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
@ -17,7 +17,7 @@ execute_process(
|
||||
# Get the latest abbreviated commit hash of the working branch
|
||||
execute_process(
|
||||
COMMAND git log -1 --pretty="%h, %ci"
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
WORKING_DIRECTORY ${SRC_DIR}
|
||||
OUTPUT_VARIABLE GIT_CURRENT_SHA1
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user