aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2019-10-26 12:23:28 -0500
committerluigi1111 <luigi1111w@gmail.com>2019-10-26 12:23:28 -0500
commitb928ead30e8c6486a2ceabcc546f86916f2889f2 (patch)
tree0609630f4c61400a3030100d11d77391a76c7cca
parentMerge pull request #6033 (diff)
parentCMake build out of source (diff)
downloadmonero-b928ead30e8c6486a2ceabcc546f86916f2889f2.tar.xz
Merge pull request #6036
7bca3e0 CMake build out of source (trasherdk)
-rw-r--r--cmake/GitVersion.cmake7
1 files changed, 6 insertions, 1 deletions
diff --git a/cmake/GitVersion.cmake b/cmake/GitVersion.cmake
index a367787f1..7eaf3ddf1 100644
--- a/cmake/GitVersion.cmake
+++ b/cmake/GitVersion.cmake
@@ -32,6 +32,7 @@
function (get_version_tag_from_git GIT)
execute_process(COMMAND "${GIT}" rev-parse --short=9 HEAD
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
RESULT_VARIABLE RET
OUTPUT_VARIABLE COMMIT
OUTPUT_STRIP_TRAILING_WHITESPACE)
@@ -47,7 +48,11 @@ function (get_version_tag_from_git GIT)
message(STATUS "You are currently on commit ${COMMIT}")
# Get all the tags
- execute_process(COMMAND "${GIT}" rev-list --tags --max-count=1 --abbrev-commit RESULT_VARIABLE RET OUTPUT_VARIABLE TAGGEDCOMMIT OUTPUT_STRIP_TRAILING_WHITESPACE)
+ execute_process(COMMAND "${GIT}" rev-list --tags --max-count=1 --abbrev-commit
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+ RESULT_VARIABLE RET
+ OUTPUT_VARIABLE TAGGEDCOMMIT
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT TAGGEDCOMMIT)
message(WARNING "Cannot determine most recent tag. Make sure that you are building either from a Git working tree or from a source archive.")