mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-17 12:40:40 -06:00
CompileFeatures: Record when AppleClang gained full CXX14 support
Use the infrastructure added by commit 646fb1a646 (CompileFeatures:
memoize C++ compilers with full language level support, 2019-03-27) to
avoid using a `try_compile` to check for C++14 feature support when the
running compiler is known to have all features.
This commit is contained in:
@@ -17,10 +17,12 @@ endif()
|
||||
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")
|
||||
set(CMAKE_CXX14_STANDARD__HAS_FULL_SUPPORT ON)
|
||||
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")
|
||||
set(CMAKE_CXX14_STANDARD__HAS_FULL_SUPPORT ON)
|
||||
endif()
|
||||
|
||||
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.1)
|
||||
|
||||
Reference in New Issue
Block a user