Skip to content

Commit

Permalink
cmake: make git describe work out of source tree
Browse files Browse the repository at this point in the history
  • Loading branch information
gauteh committed Apr 7, 2019
1 parent 9dbb881 commit bb6ffac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
# debug build - retrieve current project version from git
execute_process (
COMMAND git describe --abbrev=8 --tags --always
COMMAND git -C "${CMAKE_SOURCE_DIR}" describe --abbrev=8 --tags --always
OUTPUT_VARIABLE PROJECT_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE
)
Expand Down

0 comments on commit bb6ffac

Please sign in to comment.