diff options
author | Raul Tambre <raul@tambre.ee> | 2021-02-07 09:58:24 (GMT) |
---|---|---|
committer | Raul Tambre <raul@tambre.ee> | 2021-02-25 16:22:32 (GMT) |
commit | 72f4984cdc0ed14a4c57e60a26d0710bc13f3723 (patch) | |
tree | f31256337c8ac785de97cf102e5269fa1c3d74e7 /Modules/Compiler/Clang-C.cmake | |
parent | 82239d43f8020cb50f03bf658e97c81afb611b9a (diff) | |
download | CMake-72f4984cdc0ed14a4c57e60a26d0710bc13f3723.zip CMake-72f4984cdc0ed14a4c57e60a26d0710bc13f3723.tar.gz CMake-72f4984cdc0ed14a4c57e60a26d0710bc13f3723.tar.bz2 |
Clang: C23 support
Added in LLVM commit d06f3917913d2558b771ccc48d838f8cd8993c01, released in
Clang 9.0.
Diffstat (limited to 'Modules/Compiler/Clang-C.cmake')
-rw-r--r-- | Modules/Compiler/Clang-C.cmake | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/Compiler/Clang-C.cmake b/Modules/Compiler/Clang-C.cmake index 363a8c3..1b0b3ad 100644 --- a/Modules/Compiler/Clang-C.cmake +++ b/Modules/Compiler/Clang-C.cmake @@ -46,6 +46,11 @@ if(NOT "x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC") set(CMAKE_C17_STANDARD_COMPILE_OPTION "-std=c17") set(CMAKE_C17_EXTENSION_COMPILE_OPTION "-std=gnu17") endif() + + if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 9.0) + set(CMAKE_C23_STANDARD_COMPILE_OPTION "-std=c2x") + set(CMAKE_C23_EXTENSION_COMPILE_OPTION "-std=gnu2x") + endif() else() set(CMAKE_C90_STANDARD_COMPILE_OPTION "") set(CMAKE_C90_EXTENSION_COMPILE_OPTION "") |