summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorworktycho <work.tycho@gmail.com>2015-10-09 11:38:23 +0200
committerworktycho <work.tycho@gmail.com>2015-10-09 11:38:23 +0200
commit1a572e6611ac8faa447e585d8655230b23b29c4e (patch)
tree234e4862b863ae372d1ba6a2e308bfa3e63d3f3d
parentMerge pull request #2534 from cuberite/FixHTTPSServer (diff)
parentAdded WORKING_DIRECTORY specification to git queries used in CMake. (diff)
downloadcuberite-1a572e6611ac8faa447e585d8655230b23b29c4e.tar
cuberite-1a572e6611ac8faa447e585d8655230b23b29c4e.tar.gz
cuberite-1a572e6611ac8faa447e585d8655230b23b29c4e.tar.bz2
cuberite-1a572e6611ac8faa447e585d8655230b23b29c4e.tar.lz
cuberite-1a572e6611ac8faa447e585d8655230b23b29c4e.tar.xz
cuberite-1a572e6611ac8faa447e585d8655230b23b29c4e.tar.zst
cuberite-1a572e6611ac8faa447e585d8655230b23b29c4e.zip
Diffstat (limited to '')
-rw-r--r--CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 78bbc5c89..439a32e88 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -34,6 +34,7 @@ if(DEFINED ENV{CUBERITE_BUILD_ID})
message("Commit id not set, attempting to determine id from git")
execute_process(
COMMAND git rev-parse HEAD
+ WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
RESULT_VARIABLE GIT_EXECUTED
OUTPUT_VARIABLE BUILD_COMMIT_ID
)
@@ -48,6 +49,7 @@ else()
set(BUILD_SERIES_NAME "local build")
execute_process(
COMMAND git rev-parse HEAD
+ WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
RESULT_VARIABLE GIT_EXECUTED
OUTPUT_VARIABLE BUILD_COMMIT_ID
)
@@ -57,6 +59,7 @@ else()
string(STRIP ${BUILD_COMMIT_ID} BUILD_COMMIT_ID)
execute_process(
COMMAND git log -1 --date=iso --pretty=format:%ai
+ WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
RESULT_VARIABLE GIT_EXECUTED
OUTPUT_VARIABLE BUILD_DATETIME
)