mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-08 06:40:48 -06:00
Merge topic 'compiler-feature-AppleClang-std-flags'
228643af AppleClang: Use modern C++14 standard flags for Apple Clang 6.1
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user