summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-11-25 15:18:42 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-11-25 15:18:42 (GMT)
commit47f1020b5446b9913198995cbcc21247896670d0 (patch)
tree3e4cc669f61d55972dcef644e4ae283288ac17c8 /Modules/Compiler
parentcbec5c0445eb48d88d70abae77c0c0a8debd6a41 (diff)
parentc03c184be015649cf049ce3fd11f907f3d46036b (diff)
downloadCMake-47f1020b5446b9913198995cbcc21247896670d0.zip
CMake-47f1020b5446b9913198995cbcc21247896670d0.tar.gz
CMake-47f1020b5446b9913198995cbcc21247896670d0.tar.bz2
Merge topic 'fix-GNU-CXX-dialect-versions'
c03c184b Features: Record C++11 dialect switch only for GNU 4.7 and later.
Diffstat (limited to 'Modules/Compiler')
-rw-r--r--Modules/Compiler/GNU-CXX.cmake7
1 files changed, 3 insertions, 4 deletions
diff --git a/Modules/Compiler/GNU-CXX.cmake b/Modules/Compiler/GNU-CXX.cmake
index 422bacd..a91c901 100644
--- a/Modules/Compiler/GNU-CXX.cmake
+++ b/Modules/Compiler/GNU-CXX.cmake
@@ -11,7 +11,8 @@ else()
endif()
endif()
-if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.3)
+if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7)
+ # Supported since 4.3
set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "-std=c++98")
set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "-std=gnu++98")
endif()
@@ -19,9 +20,7 @@ endif()
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7)
set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "-std=c++11")
set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "-std=gnu++11")
-elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.3)
- set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "-std=c++0x")
- set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "-std=gnu++0x")
+ # 4.3 supports 0x variants
endif()
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9)