Line 0
Link Here
|
|
|
1 |
Make sure we only pass -std=c++0x if the compiler supports it (i.e. it is not base GCC). |
2 |
|
3 |
--- kde-modules/KDECompilerSettings.cmake.orig 2016-09-06 19:26:59 UTC |
4 |
+++ kde-modules/KDECompilerSettings.cmake |
5 |
@@ -181,7 +181,8 @@ if (CMAKE_C_COMPILER_ID STREQUAL "GNU" O |
6 |
# compilers (in particular, MSVC 2010 does not support C99) |
7 |
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=iso9899:1990") |
8 |
endif() |
9 |
-if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang") |
10 |
+if ((CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "4.2.4") OR |
11 |
+ CMAKE_CXX_COMPILER_ID STREQUAL "Clang") |
12 |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") |
13 |
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Intel" AND NOT WIN32) |
14 |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") |