summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-07-10 12:51:09 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-07-10 12:51:09 (GMT)
commit2ffa8ae29c3caa192eed47399c87680af09d08f0 (patch)
tree8aa343b4bf3d965b07a14f9a74f56e080904bc33
parent9f9d26465fec48f9fe3310079c2414b314feaab1 (diff)
parent228643af6d8c0e29735c3fdf7b25c161a11a68c9 (diff)
downloadCMake-2ffa8ae29c3caa192eed47399c87680af09d08f0.zip
CMake-2ffa8ae29c3caa192eed47399c87680af09d08f0.tar.gz
CMake-2ffa8ae29c3caa192eed47399c87680af09d08f0.tar.bz2
Merge topic 'compiler-feature-AppleClang-std-flags'
228643af AppleClang: Use modern C++14 standard flags for Apple Clang 6.1
-rw-r--r--Modules/Compiler/AppleClang-CXX.cmake5
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/Compiler/AppleClang-CXX.cmake b/Modules/Compiler/AppleClang-CXX.cmake
index 5194da4..1ba8a77 100644
--- a/Modules/Compiler/AppleClang-CXX.cmake
+++ b/Modules/Compiler/AppleClang-CXX.cmake
@@ -13,7 +13,10 @@ if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.0)
set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "-std=gnu++11")
endif()
-if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.1)
+if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.1)
+ set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "-std=c++14")
+ set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-std=gnu++14")
+elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.1)
# AppleClang 5.0 knows this flag, but does not set a __cplusplus macro greater than 201103L
set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "-std=c++1y")
set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-std=gnu++1y")