diff options
author | Gaute Hope <eg@gaute.vetsj.com> | 2019-04-07 14:06:26 +0200 |
---|---|---|
committer | Gaute Hope <eg@gaute.vetsj.com> | 2019-04-07 14:07:15 +0200 |
commit | bb6ffacd86046ba8c2cff51bf2688cb4e2043bd2 (patch) | |
tree | 79d47942ea41d461b378034e12b534639b154af0 | |
parent | 9dbb881e8d59f6c17a934e8ba54724dbd5d2c36b (diff) |
cmake: make git describe work out of source tree
-rw-r--r-- | CMakeLists.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c77402d..29b7232 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 ) |