mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-31 10:50:16 -06:00
Clang: use -std=c++23 for Clang 17.0+
Canonical flag changed in LLVM commit ba15d186e5cef2620d562c6c9d9a6d570382cd0a.
This commit is contained in:
@@ -173,7 +173,10 @@ macro(__compiler_clang_cxx_standards lang)
|
||||
|
||||
unset(_clang_version_std17)
|
||||
|
||||
if(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 12.0)
|
||||
if(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 17.0)
|
||||
set(CMAKE_${lang}23_STANDARD_COMPILE_OPTION "-std=c++23")
|
||||
set(CMAKE_${lang}23_EXTENSION_COMPILE_OPTION "-std=gnu++23")
|
||||
elseif(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 12.0)
|
||||
set(CMAKE_${lang}23_STANDARD_COMPILE_OPTION "-std=c++2b")
|
||||
set(CMAKE_${lang}23_EXTENSION_COMPILE_OPTION "-std=gnu++2b")
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user