summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler/AppleClang-CXX.cmake
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-02-04 21:04:18 (GMT)
committerBrad King <brad.king@kitware.com>2015-02-04 23:29:53 (GMT)
commit9d767810e1e54eb9233854f0dbf1345a0b5be60f (patch)
treedace19f8ca996abbefb5cc30c1f401ac8cc27097 /Modules/Compiler/AppleClang-CXX.cmake
parent72537e4436a17535af5424628adef3b614a61679 (diff)
downloadCMake-9d767810e1e54eb9233854f0dbf1345a0b5be60f.zip
CMake-9d767810e1e54eb9233854f0dbf1345a0b5be60f.tar.gz
CMake-9d767810e1e54eb9233854f0dbf1345a0b5be60f.tar.bz2
Features: Populate CMAKE_<LANG>_STANDARD_DEFAULT only for supported compilers.
If no compiler feature information is known for a given compiler version, do not set a language standard default either. The two settings must be recorded consistently.
Diffstat (limited to 'Modules/Compiler/AppleClang-CXX.cmake')
-rw-r--r--Modules/Compiler/AppleClang-CXX.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/Compiler/AppleClang-CXX.cmake b/Modules/Compiler/AppleClang-CXX.cmake
index 6d58be3..5194da4 100644
--- a/Modules/Compiler/AppleClang-CXX.cmake
+++ b/Modules/Compiler/AppleClang-CXX.cmake
@@ -19,7 +19,9 @@ if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.1)
set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-std=gnu++1y")
endif()
-set(CMAKE_CXX_STANDARD_DEFAULT 98)
+if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.0)
+ set(CMAKE_CXX_STANDARD_DEFAULT 98)
+endif()
macro(cmake_record_cxx_compile_features)
macro(_get_appleclang_features std_version list)