summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
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
)