From 5fa206a4208b64b4a536bf7e2ab49affc56500d4 Mon Sep 17 00:00:00 2001 From: Tycho Date: Sat, 6 Sep 2014 15:30:13 +0100 Subject: bumped cmake version min and fixed clang support --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index dd9b1e67c..a00ed84c6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.2) +cmake_minimum_required (VERSION 2.8.10) # Without this, the MSVC variable isn't defined for MSVC builds ( http://www.cmake.org/pipermail/cmake/2011-November/047130.html ) enable_language(CXX C) -- cgit v1.2.3 From 562b2d1d1de7438bc763d778b56b0743affd1b5b Mon Sep 17 00:00:00 2001 From: Tycho Date: Sat, 6 Sep 2014 16:30:04 +0100 Subject: Added workaround for clang version --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index a00ed84c6..4c47eb509 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.10) +cmake_minimum_required (VERSION 2.8.7) # Without this, the MSVC variable isn't defined for MSVC builds ( http://www.cmake.org/pipermail/cmake/2011-November/047130.html ) enable_language(CXX C) -- cgit v1.2.3 From 27be1799392e89b2b67121ea6febd51c2b9ec4fb Mon Sep 17 00:00:00 2001 From: Tycho Date: Wed, 10 Sep 2014 16:07:00 +0100 Subject: Added abilty to set build info build info is displayed at startup Fixes #1410 --- CMakeLists.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 4c47eb509..8f58f157a 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{BUILD_ID}) + set(BUILD_ID $ENV{BUILD_ID}) + set(BUILD_SERIES_NAME $ENV{BUILD_SERIES_NAME}) + set(BUILD_DATETIME $ENV{BUILD_DATETIME}) + if(DEFINED ENV{BUILD_COMMIT_ID}) + set(BUILD_COMMIT_ID $ENV{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/) -- cgit v1.2.3 From 4f67ca4c0ac2f3ea4090882d982670b94913c6b2 Mon Sep 17 00:00:00 2001 From: Tycho Date: Wed, 10 Sep 2014 18:08:50 +0100 Subject: Added MCServer_ prfix to env vars for versions --- CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 8f58f157a..188cf81e3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,12 +18,12 @@ if(DEFINED ENV{TRAVIS_BUILD_WITH_COVERAGE}) set(BUILD_WITH_COVERAGE $ENV{TRAVIS_BUILD_WITH_COVERAGE}) endif() -if(DEFINED ENV{BUILD_ID}) - set(BUILD_ID $ENV{BUILD_ID}) - set(BUILD_SERIES_NAME $ENV{BUILD_SERIES_NAME}) - set(BUILD_DATETIME $ENV{BUILD_DATETIME}) - if(DEFINED ENV{BUILD_COMMIT_ID}) - set(BUILD_COMMIT_ID $ENV{BUILD_COMMIT_ID}) +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( -- cgit v1.2.3