summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-11-08 16:33:19 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-11-08 16:33:19 -0800
commit761c3e4718e953a7c018990fccf7709ba8febf07 (patch)
tree94bb43855300d0a56e3c98952224dcec0d07cac4 /CMakeLists.txt
parent871f585f42fd59199d5c616fa93d6eb1037b445a (diff)
downloadsubsurface-761c3e4718e953a7c018990fccf7709ba8febf07.tar.gz
Revert "Mac: don't use C++11 on older clang versions"
This reverts commit acb74f25f7e6d26df7f39f596510ee2d5226fb15. Better not enable it anywhere
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt30
1 files changed, 13 insertions, 17 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 62e774e20..135672321 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -53,23 +53,19 @@ execute_process(
message(STATUS "Creating build files for Subsurface ${SSRF_VERSION_STRING}")
-if (APPLE AND "${CMAKE_CXX_COMPILER_VERSION}" STRLESS "5.0")
- message(STATUS "Old compiler ${CMAKE_CXX_COMPILER_VERSION} doesn't support C++11")
-else()
- if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11 ")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
- elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11 ")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
- elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
- elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
- # using Intel C++
- elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
- # using Visual Studio C++
- endif()
+if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11 ")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11 ")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
+ # using Intel C++
+elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
+ # using Visual Studio C++
endif()
# pkgconfig for required libraries