Commit b6420220 authored by Brad King's avatar Brad King
Browse files

AppleClang: Add flags for C17 and C23

Follow up commit 72f4984c (Clang: C23 support, 2021-02-07).
parent 4371a25d
Pipeline #233527 waiting for manual action with stages
in 15 minutes and 51 seconds
......@@ -28,4 +28,14 @@ if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.0)
set(CMAKE_C11_STANDARD__HAS_FULL_SUPPORT ON)
endif()
__compiler_check_default_language_standard(C 4.0 99)
if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 11.0)
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 11.0.3)
set(CMAKE_C23_STANDARD_COMPILE_OPTION "-std=c2x")
set(CMAKE_C23_EXTENSION_COMPILE_OPTION "-std=gnu2x")
endif()
__compiler_check_default_language_standard(C 4.0 99 9.1 11 12.0.5 17)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment