diff options
-rw-r--r-- | Help/release/dev/apple-clang-supports-cxx20.rst | 4 | ||||
-rw-r--r-- | Modules/Compiler/AppleClang-CXX.cmake | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/Help/release/dev/apple-clang-supports-cxx20.rst b/Help/release/dev/apple-clang-supports-cxx20.rst new file mode 100644 index 0000000..f19ee68 --- /dev/null +++ b/Help/release/dev/apple-clang-supports-cxx20.rst @@ -0,0 +1,4 @@ +apple-clang-supports-cxx20 +-------------------------- + +* AppleClang compiler have learned how to compile C++20. diff --git a/Modules/Compiler/AppleClang-CXX.cmake b/Modules/Compiler/AppleClang-CXX.cmake index 2042360..1eae50e 100644 --- a/Modules/Compiler/AppleClang-CXX.cmake +++ b/Modules/Compiler/AppleClang-CXX.cmake @@ -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) |