summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-09-12 13:28:06 +0200
committerHowaner <franzi.moos@googlemail.com>2014-09-12 13:28:06 +0200
commitbee615b75b3cd98335beaa8f5a6c4487ccccb0fd (patch)
tree26180f7088ee6ad69832f7af46182606a8c66489 /CMakeLists.txt
parentFixed many right click issues. (diff)
parentFixed a redstone sim failure with droppers. (diff)
downloadcuberite-bee615b75b3cd98335beaa8f5a6c4487ccccb0fd.tar
cuberite-bee615b75b3cd98335beaa8f5a6c4487ccccb0fd.tar.gz
cuberite-bee615b75b3cd98335beaa8f5a6c4487ccccb0fd.tar.bz2
cuberite-bee615b75b3cd98335beaa8f5a6c4487ccccb0fd.tar.lz
cuberite-bee615b75b3cd98335beaa8f5a6c4487ccccb0fd.tar.xz
cuberite-bee615b75b3cd98335beaa8f5a6c4487ccccb0fd.tar.zst
cuberite-bee615b75b3cd98335beaa8f5a6c4487ccccb0fd.zip
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt19
1 files changed, 19 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4c47eb509..188cf81e3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -18,6 +18,25 @@ if(DEFINED ENV{TRAVIS_BUILD_WITH_COVERAGE})
set(BUILD_WITH_COVERAGE $ENV{TRAVIS_BUILD_WITH_COVERAGE})
endif()
+if(DEFINED ENV{MCSERVER_BUILD_ID})
+ set(BUILD_ID $ENV{MCSERVER_BUILD_ID})
+ set(BUILD_SERIES_NAME $ENV{MCSERVER_BUILD_SERIES_NAME})
+ set(BUILD_DATETIME $ENV{MCSERVER_BUILD_DATETIME})
+ if(DEFINED ENV{MCSERVER_BUILD_COMMIT_ID})
+ set(BUILD_COMMIT_ID $ENV{MCSERVER_BUILD_COMMIT_ID})
+ else()
+ message("Commit id not set, attempting to determine id from git")
+ execute_process(
+ COMMAND git rev-parse HEAD
+ RESULT_VARIABLE GIT_EXECUTED
+ OUTPUT_VARIABLE BUILD_COMMIT_ID)
+ string(STRIP ${BUILD_COMMIT_ID} BUILD_COMMIT_ID)
+ if (NOT (GIT_EXECUTED EQUAL 0))
+ message(FATAL_ERROR "Could not identifiy git commit id")
+ endif()
+ endif()
+endif()
+
# This has to be done before any flags have been set up.
if(${BUILD_TOOLS})
add_subdirectory(Tools/MCADefrag/)