summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-03-10 21:56:16 +0100
committerTycho <work.tycho+git@gmail.com>2014-03-10 21:56:16 +0100
commitf5f7c6b38bcccb49735a95589b8c68093f09453f (patch)
tree75843fb49954627ac143e78eb2568df348847711
parentMerge branch 'master' into Werror (diff)
parentMerge pull request #767 from worktycho/envmatrix (diff)
downloadcuberite-f5f7c6b38bcccb49735a95589b8c68093f09453f.tar
cuberite-f5f7c6b38bcccb49735a95589b8c68093f09453f.tar.gz
cuberite-f5f7c6b38bcccb49735a95589b8c68093f09453f.tar.bz2
cuberite-f5f7c6b38bcccb49735a95589b8c68093f09453f.tar.lz
cuberite-f5f7c6b38bcccb49735a95589b8c68093f09453f.tar.xz
cuberite-f5f7c6b38bcccb49735a95589b8c68093f09453f.tar.zst
cuberite-f5f7c6b38bcccb49735a95589b8c68093f09453f.zip
Diffstat (limited to '')
-rw-r--r--.travis.yml8
-rw-r--r--CMakeLists.txt11
-rw-r--r--src/CMakeLists.txt2
3 files changed, 18 insertions, 3 deletions
diff --git a/.travis.yml b/.travis.yml
index c6537cf47..0ab25ae3b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,7 +3,13 @@ compiler:
- gcc
- clang
# Build MCServer
-script: cmake . -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_TOOLS=1 -DSELF_TEST=1 && make -j 2 && cd MCServer/ && (echo stop | ./MCServer)
+script: cmake . -DBUILD_TOOLS=1 -DSELF_TEST=1 && make -j 2 && cd MCServer/ && (echo stop | $MCSERVER_PATH)
+
+env:
+ - TRAVIS_MCSERVER_BUILD_TYPE=RELEASE MCSERVER_PATH=./MCServer
+ - TRAVIS_MCSERVER_BUILD_TYPE=DEBUG MCSERVER_PATH=./MCServer_debug
+ - TRAVIS_MCSERVER_BUILD_TYPE=RELEASE TRAVIS_MCSERVER_FORCE32=1 MCSERVER_PATH=./MCServer
+ - TRAVIS_MCSERVER_BUILD_TYPE=DEBUG TRAVIS_MCSERVER_FORCE32=1 MCSERVER_PATH=./MCServer_debug
# Notification Settings
notifications:
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 05b6d879b..9a860920c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,6 +3,17 @@ cmake_minimum_required (VERSION 2.6)
# 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)
+# These env variables are used for configuring Travis CI builds.
+# See https://github.com/mc-server/MCServer/pull/767
+if(DEFINED ENV{TRAVIS_MCSERVER_BUILD_TYPE})
+ message("Setting build type to $ENV{TRAVIS_MCSERVER_BUILD_TYPE}")
+ set(CMAKE_BUILD_TYPE $ENV{TRAVIS_MCSERVER_BUILD_TYPE})
+endif()
+
+if(DEFINED ENV{TRAVIS_MCSERVER_FORCE32})
+ set(FORCE32 $ENV{TRAVIS_MCSERVER_FORCE32})
+endif()
+
# This has to be done before any flags have been set up.
if(${BUILD_TOOLS})
add_subdirectory(Tools/MCADefrag/)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 5029906aa..c2de26664 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,4 +1,3 @@
-
cmake_minimum_required (VERSION 2.8.2)
project (MCServer)
@@ -10,7 +9,6 @@ set(FOLDERS OSSupport HTTPServer Items Blocks Protocol Generating)
set(FOLDERS ${FOLDERS} WorldStorage Mobs Entities Simulator UI BlockEntities)
-
if (NOT MSVC)
#Bindings needs to reference other folders so are done here