summaryrefslogtreecommitdiffstats
path: root/lib/libcxx/utils/google-benchmark/cmake/GetGitVersion.cmake
diff options
context:
space:
mode:
authorpatrick <patrick@openbsd.org>2019-02-04 16:55:44 +0000
committerpatrick <patrick@openbsd.org>2019-02-04 16:55:44 +0000
commit76c648e7a477ffb2a882ad5ffe523269bd9a3f6a (patch)
tree29d319d598650bab04e4f58e5e8769567e33091e /lib/libcxx/utils/google-benchmark/cmake/GetGitVersion.cmake
parentImport libc++abi 7.0.1. (diff)
downloadwireguard-openbsd-76c648e7a477ffb2a882ad5ffe523269bd9a3f6a.tar.xz
wireguard-openbsd-76c648e7a477ffb2a882ad5ffe523269bd9a3f6a.zip
Import libc++ 7.0.1.
Diffstat (limited to 'lib/libcxx/utils/google-benchmark/cmake/GetGitVersion.cmake')
-rw-r--r--lib/libcxx/utils/google-benchmark/cmake/GetGitVersion.cmake3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libcxx/utils/google-benchmark/cmake/GetGitVersion.cmake b/lib/libcxx/utils/google-benchmark/cmake/GetGitVersion.cmake
index 8dd94800459..88cebe3a1ca 100644
--- a/lib/libcxx/utils/google-benchmark/cmake/GetGitVersion.cmake
+++ b/lib/libcxx/utils/google-benchmark/cmake/GetGitVersion.cmake
@@ -21,6 +21,7 @@ set(__get_git_version INCLUDED)
function(get_git_version var)
if(GIT_EXECUTABLE)
execute_process(COMMAND ${GIT_EXECUTABLE} describe --match "v[0-9]*.[0-9]*.[0-9]*" --abbrev=8
+ WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
RESULT_VARIABLE status
OUTPUT_VARIABLE GIT_VERSION
ERROR_QUIET)
@@ -33,9 +34,11 @@ function(get_git_version var)
# Work out if the repository is dirty
execute_process(COMMAND ${GIT_EXECUTABLE} update-index -q --refresh
+ WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
OUTPUT_QUIET
ERROR_QUIET)
execute_process(COMMAND ${GIT_EXECUTABLE} diff-index --name-only HEAD --
+ WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
OUTPUT_VARIABLE GIT_DIFF_INDEX
ERROR_QUIET)
string(COMPARE NOTEQUAL "${GIT_DIFF_INDEX}" "" GIT_DIRTY)