Features: Activate C++20 support for AppleClang 10.0+

This commit is contained in:
Robert Maynard 2019-05-07 13:38:35 -04:00
parent fa077acba5
commit 9523ca72e2
2 changed files with 9 additions and 1 deletions

View File

@ -0,0 +1,4 @@
apple-clang-supports-cxx20
--------------------------
* AppleClang compiler have learned how to compile C++20.

View File

@ -28,9 +28,13 @@ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.1)
set(CMAKE_CXX17_EXTENSION_COMPILE_OPTION "-std=gnu++1z")
endif()
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0)
set(CMAKE_CXX11_STANDARD__HAS_FULL_SUPPORT ON)
endif()
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 10.0)
set(CMAKE_CXX20_STANDARD_COMPILE_OPTION "-std=c++2a")
set(CMAKE_CXX20_EXTENSION_COMPILE_OPTION "-std=gnu++2a")
endif()
__compiler_check_default_language_standard(CXX 4.0 98)