diff options
Diffstat (limited to 'Modules/Compiler/Clang.cmake')
-rw-r--r-- | Modules/Compiler/Clang.cmake | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/Modules/Compiler/Clang.cmake b/Modules/Compiler/Clang.cmake index 9f93d41..7035d93 100644 --- a/Modules/Compiler/Clang.cmake +++ b/Modules/Compiler/Clang.cmake @@ -194,16 +194,25 @@ macro(__compiler_clang_cxx_standards lang) set(CMAKE_${lang}11_EXTENSION_COMPILE_OPTION "") set(CMAKE_${lang}14_STANDARD_COMPILE_OPTION "-std:c++14") set(CMAKE_${lang}14_EXTENSION_COMPILE_OPTION "-std:c++14") - if (CMAKE_${lang}_COMPILER_VERSION VERSION_GREATER_EQUAL 6.0) + + if(CMAKE_${lang}_COMPILER_VERSION VERSION_GREATER_EQUAL 6.0) set(CMAKE_${lang}17_STANDARD_COMPILE_OPTION "-std:c++17") set(CMAKE_${lang}17_EXTENSION_COMPILE_OPTION "-std:c++17") - set(CMAKE_${lang}20_STANDARD_COMPILE_OPTION "-std:c++latest") - set(CMAKE_${lang}20_EXTENSION_COMPILE_OPTION "-std:c++latest") else() set(CMAKE_${lang}17_STANDARD_COMPILE_OPTION "-std:c++latest") set(CMAKE_${lang}17_EXTENSION_COMPILE_OPTION "-std:c++latest") endif() + if(CMAKE_${lang}_COMPILER_VERSION VERSION_GREATER_EQUAL 13.0) + set(CMAKE_${lang}23_STANDARD_COMPILE_OPTION "-std:c++latest") + set(CMAKE_${lang}23_EXTENSION_COMPILE_OPTION "-std:c++latest") + set(CMAKE_${lang}20_STANDARD_COMPILE_OPTION "-std:c++20") + set(CMAKE_${lang}20_EXTENSION_COMPILE_OPTION "-std:c++20") + elseif(CMAKE_${lang}_COMPILER_VERSION VERSION_GREATER_EQUAL 6.0) + set(CMAKE_${lang}20_STANDARD_COMPILE_OPTION "-std:c++latest") + set(CMAKE_${lang}20_EXTENSION_COMPILE_OPTION "-std:c++latest") + endif() + __compiler_check_default_language_standard(${lang} 3.9 14) else() # This version of clang-cl, or the MSVC version it simulates, does not have |