summaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2017-05-26 17:03:46 +0200
committerLoïc Blot <nerzhul@users.noreply.github.com>2017-06-04 09:57:08 +0200
commitbf6569b57019d070246d947ed929cb2b5eb67faf (patch)
tree3a8a3d4858f20a57930e0a0d0ad1f7c3fb48b512 /src/CMakeLists.txt
parent0e58168fe5bce607f64805b854420e7558372f24 (diff)
downloadminetest-bf6569b57019d070246d947ed929cb2b5eb67faf.tar.gz
minetest-bf6569b57019d070246d947ed929cb2b5eb67faf.tar.bz2
minetest-bf6569b57019d070246d947ed929cb2b5eb67faf.zip
Minetest for C++11 (CMakeLists + Travis)
* Move GCC to GCC 6 & GCC 7 * Move Clang to Clang 3.6 & Clang 4.0 * LINT moves from Clang 3.9 to Clang 4.0 * Move XCode 7.3 to 8.0 * Use more travis tricks to install compilers instead of adding complexity to our build script * Clang format fixes on checked files (compat Cpp11 instead of Cpp03) * Mingw GCC update from 4.8.4 to 5.3 (Ubuntu Xenial) * Drop mingw cmake generated files and add them to gitignore
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 7c1a4eee0..6963d0306 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -708,7 +708,7 @@ include(CheckCXXCompilerFlag)
if(MSVC)
# Visual Studio
-
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++11")
# EHa enables SEH exceptions (used for catching segfaults)
set(CMAKE_CXX_FLAGS_RELEASE "/EHa /Ox /GL /FD /MT /GS- /Zi /arch:SSE /fp:fast /D NDEBUG /D _HAS_ITERATOR_DEBUGGING=0 /TP")
#set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/LTCG /NODEFAULTLIB:\"libcmtd.lib\" /NODEFAULTLIB:\"libcmt.lib\"")
@@ -728,9 +728,10 @@ if(MSVC)
# /MT = Link statically with standard library stuff
set(CMAKE_C_FLAGS_RELEASE "/O2 /Ob2 /MT")
else()
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
# Probably GCC
if(APPLE)
- SET( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pagezero_size 10000 -image_base 100000000" )
+ SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pagezero_size 10000 -image_base 100000000" )
endif()
if(WARN_ALL)
set(RELEASE_WARNING_FLAGS "-Wall")