summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-03-15 16:46:25 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-03-15 16:46:33 (GMT)
commit37f7d0d2951a6fcc833f98cd74325d9db9edce35 (patch)
tree11a04a3eadaf45e2f1261911bf01c06dbd68880a /Modules/Compiler
parent03a2b524d377bcfa250a4c6b1e2b5fbf3e91c1a7 (diff)
parent683e4e9caba5fda32f9ae14473a0fe612c3f783c (diff)
downloadCMake-37f7d0d2951a6fcc833f98cd74325d9db9edce35.zip
CMake-37f7d0d2951a6fcc833f98cd74325d9db9edce35.tar.gz
CMake-37f7d0d2951a6fcc833f98cd74325d9db9edce35.tar.bz2
Merge topic 'AppleClang-cxx20-cxx23-flags'
683e4e9cab AppleClang: Add C++20 and C++23 flags Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7063
Diffstat (limited to 'Modules/Compiler')
-rw-r--r--Modules/Compiler/AppleClang-CXX.cmake10
1 files changed, 9 insertions, 1 deletions
diff --git a/Modules/Compiler/AppleClang-CXX.cmake b/Modules/Compiler/AppleClang-CXX.cmake
index 28be1df..7c97969 100644
--- a/Modules/Compiler/AppleClang-CXX.cmake
+++ b/Modules/Compiler/AppleClang-CXX.cmake
@@ -47,9 +47,17 @@ 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)
+if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13.0)
+ set(CMAKE_CXX20_STANDARD_COMPILE_OPTION "-std=c++20")
+ set(CMAKE_CXX20_EXTENSION_COMPILE_OPTION "-std=gnu++20")
+elseif (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()
+if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13.0)
+ set(CMAKE_CXX23_STANDARD_COMPILE_OPTION "-std=c++2b")
+ set(CMAKE_CXX23_EXTENSION_COMPILE_OPTION "-std=gnu++2b")
+endif()
+
__compiler_check_default_language_standard(CXX 4.0 98)