diff options
author | Brad King <brad.king@kitware.com> | 2024-05-14 14:24:11 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2024-05-14 14:24:22 (GMT) |
commit | 646c921ce6e4b2338501f51baaa989ceca0b2508 (patch) | |
tree | 5199e40867e1c25813916e5f06d588edbead3b00 /Modules | |
parent | 078320c78401a1ed610a35b5217bbb71caa288f1 (diff) | |
parent | 80d4bd5370235c03a27296e91de5ec7e24cc2ebc (diff) | |
download | CMake-646c921ce6e4b2338501f51baaa989ceca0b2508.zip CMake-646c921ce6e4b2338501f51baaa989ceca0b2508.tar.gz CMake-646c921ce6e4b2338501f51baaa989ceca0b2508.tar.bz2 |
Merge topic 'intel-std'
80d4bd5370 IntelLLVM: Record C++26 support
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9511
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/Compiler/IntelLLVM-CXX.cmake | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/Modules/Compiler/IntelLLVM-CXX.cmake b/Modules/Compiler/IntelLLVM-CXX.cmake index 989a1d4..45e5d66 100644 --- a/Modules/Compiler/IntelLLVM-CXX.cmake +++ b/Modules/Compiler/IntelLLVM-CXX.cmake @@ -49,11 +49,21 @@ if(NOT "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC") set(CMAKE_CXX_STANDARD_LATEST 20) - if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 2021.2.0) + if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 2024.0.0) + set(CMAKE_CXX23_STANDARD_COMPILE_OPTION "-std=c++23") + set(CMAKE_CXX23_EXTENSION_COMPILE_OPTION "-std=gnu++23") + set(CMAKE_CXX_STANDARD_LATEST 23) + elseif(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 2021.2.0) set(CMAKE_CXX23_STANDARD_COMPILE_OPTION "-std=c++2b") set(CMAKE_CXX23_EXTENSION_COMPILE_OPTION "-std=gnu++2b") set(CMAKE_CXX_STANDARD_LATEST 23) endif() + + if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 2024.0.0) + set(CMAKE_CXX26_STANDARD_COMPILE_OPTION "-std=c++26") + set(CMAKE_CXX26_EXTENSION_COMPILE_OPTION "-std=gnu++26") + set(CMAKE_CXX_STANDARD_LATEST 26) + endif() else() set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "") set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "") @@ -72,11 +82,22 @@ else() set(CMAKE_CXX_STANDARD_LATEST 20) - if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 2021.2.0) + if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 2024.0.0) + set(CMAKE_CXX23_STANDARD_COMPILE_OPTION "-Qstd=c++23") + set(CMAKE_CXX23_EXTENSION_COMPILE_OPTION "-Qstd=c++23") + set(CMAKE_CXX_STANDARD_LATEST 23) + elseif(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 2021.2.0) set(CMAKE_CXX23_STANDARD_COMPILE_OPTION "-Qstd:c++2b") set(CMAKE_CXX23_EXTENSION_COMPILE_OPTION "-Qstd:c++2b") set(CMAKE_CXX_STANDARD_LATEST 23) endif() + + if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 2024.0.0) + set(CMAKE_CXX26_STANDARD_COMPILE_OPTION "-Qstd=c++26") + set(CMAKE_CXX26_EXTENSION_COMPILE_OPTION "-Qstd=c++26") + set(CMAKE_CXX_STANDARD_LATEST 26) + endif() + endif() __compiler_check_default_language_standard(CXX 2020 14) |