summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-01-26 16:16:24 +0100
committerTycho <work.tycho+git@gmail.com>2014-01-26 16:20:24 +0100
commit6952b24e88290dcbce9b15c39613ee35a5af7f12 (patch)
tree9f990a67ab496a636b2fe7bfb1e421fba1c50df9 /CMakeLists.txt
parentRemoved cWorld Include (diff)
downloadcuberite-6952b24e88290dcbce9b15c39613ee35a5af7f12.tar
cuberite-6952b24e88290dcbce9b15c39613ee35a5af7f12.tar.gz
cuberite-6952b24e88290dcbce9b15c39613ee35a5af7f12.tar.bz2
cuberite-6952b24e88290dcbce9b15c39613ee35a5af7f12.tar.lz
cuberite-6952b24e88290dcbce9b15c39613ee35a5af7f12.tar.xz
cuberite-6952b24e88290dcbce9b15c39613ee35a5af7f12.tar.zst
cuberite-6952b24e88290dcbce9b15c39613ee35a5af7f12.zip
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt13
1 files changed, 11 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 70728706d..8f336e20f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -44,13 +44,22 @@ if(MSVC)
set(CMAKE_MODULE_LINKER_FLAGS_RELEASE "${CMAKE_MODULE_LINKER_FLAGS_RELEASE} /LTCG")
elseif(APPLE)
#on os x clang adds pthread for us but we need to add it for gcc
- if (NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+ 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_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -std=c++11")
+ else()
add_flags_cxx("-pthread")
- add_flags_cxx("-std=c++11")
endif()
+
else()
# Let gcc / clang know that we're compiling a multi-threaded app:
add_flags_cxx("-pthread")
+ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+ 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_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -std=c++11")
+ endif()
endif()