summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-11-23 15:21:44 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-11-23 15:21:44 +0100
commite8e03e5df2d93109c1aa68592a70eb593bd8ed87 (patch)
tree4be06960c356a854d5ec06de2312262bfafedafa
parentMerged branch 'master' into c++11. (diff)
downloadcuberite-e8e03e5df2d93109c1aa68592a70eb593bd8ed87.tar
cuberite-e8e03e5df2d93109c1aa68592a70eb593bd8ed87.tar.gz
cuberite-e8e03e5df2d93109c1aa68592a70eb593bd8ed87.tar.bz2
cuberite-e8e03e5df2d93109c1aa68592a70eb593bd8ed87.tar.lz
cuberite-e8e03e5df2d93109c1aa68592a70eb593bd8ed87.tar.xz
cuberite-e8e03e5df2d93109c1aa68592a70eb593bd8ed87.tar.zst
cuberite-e8e03e5df2d93109c1aa68592a70eb593bd8ed87.zip
Diffstat (limited to '')
-rw-r--r--.travis.yml9
-rw-r--r--SetFlags.cmake35
2 files changed, 20 insertions, 24 deletions
diff --git a/.travis.yml b/.travis.yml
index 5260cfd17..4e8377748 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,6 +6,15 @@ compiler:
before_install:
- if [ "$TRAVIS_MCSERVER_BUILD_TYPE" == "COVERAGE" ]; then sudo pip install cpp_coveralls; fi
+ # g++4.8
+ - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
+ - sudo apt-get update -qq
+
+install:
+ # g++4.8
+ - sudo apt-get install -qq g++-4.8
+ - export CXX="g++-4.8"
+
# Build MCServer
script: ./CIbuild.sh
diff --git a/SetFlags.cmake b/SetFlags.cmake
index c0a021c25..0d1bd99b3 100644
--- a/SetFlags.cmake
+++ b/SetFlags.cmake
@@ -64,18 +64,12 @@ macro(set_flags)
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion
OUTPUT_VARIABLE GCC_VERSION)
endif()
-
- if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND (NOT GCC_VERSION VERSION_GREATER 4.6))
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
- set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -std=c++0x")
- set(CMAKE_CXX_FLAGS_COVERAGE "${CMAKE_CXX_FLAGS_COVERAGE} -std=c++0x")
- set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -std=c++0x")
- else()
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
- set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -std=c++11")
- set(CMAKE_CXX_FLAGS_COVERAGE "${CMAKE_CXX_FLAGS_COVERAGE} -std=c++11")
- set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -std=c++11")
- endif()
+
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -std=c++11")
+ set(CMAKE_CXX_FLAGS_COVERAGE "${CMAKE_CXX_FLAGS_COVERAGE} -std=c++11")
+ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -std=c++11")
+
#on os x clang adds pthread for us but we need to add it for gcc
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
add_flags_cxx("-stdlib=libc++")
@@ -94,18 +88,11 @@ macro(set_flags)
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion
OUTPUT_VARIABLE GCC_VERSION)
endif()
-
- if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND (NOT GCC_VERSION VERSION_GREATER 4.6))
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
- set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -std=c++0x")
- set(CMAKE_CXX_FLAGS_COVERAGE "${CMAKE_CXX_FLAGS_COVERAGE} -std=c++0x")
- set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -std=c++0x")
- else()
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
- set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -std=c++11")
- set(CMAKE_CXX_FLAGS_COVERAGE "${CMAKE_CXX_FLAGS_COVERAGE} -std=c++11")
- set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -std=c++11")
- endif()
+
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -std=c++11")
+ set(CMAKE_CXX_FLAGS_COVERAGE "${CMAKE_CXX_FLAGS_COVERAGE} -std=c++11")
+ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -std=c++11")
# We use a signed char (fixes #640 on RasPi)
add_flags_cxx("-fsigned-char")