diff options
author | Gregor Jasny <gjasny@googlemail.com> | 2021-06-11 11:40:57 (GMT) |
---|---|---|
committer | Gregor Jasny <gjasny@googlemail.com> | 2021-06-11 12:47:23 (GMT) |
commit | e8dc95ae1ec0f0ded781b7b36f3117e499502273 (patch) | |
tree | f7bf2adadc2380d804903a2d3e2403d45826117e /Modules/Compiler/Clang-OBJC.cmake | |
parent | 2086b938a7b60ce07a28840240de82687b769575 (diff) | |
download | CMake-e8dc95ae1ec0f0ded781b7b36f3117e499502273.zip CMake-e8dc95ae1ec0f0ded781b7b36f3117e499502273.tar.gz CMake-e8dc95ae1ec0f0ded781b7b36f3117e499502273.tar.bz2 |
ObjectiveC: Add C17 and C23 support
Issue: #22297
Diffstat (limited to 'Modules/Compiler/Clang-OBJC.cmake')
-rw-r--r-- | Modules/Compiler/Clang-OBJC.cmake | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Modules/Compiler/Clang-OBJC.cmake b/Modules/Compiler/Clang-OBJC.cmake index 19179e3..7a83b77 100644 --- a/Modules/Compiler/Clang-OBJC.cmake +++ b/Modules/Compiler/Clang-OBJC.cmake @@ -24,4 +24,16 @@ if(NOT CMAKE_OBJC_COMPILER_VERSION VERSION_LESS 3.4) set(CMAKE_OBJC11_STANDARD__HAS_FULL_SUPPORT ON) endif() +if(NOT CMAKE_OBJC_COMPILER_VERSION VERSION_LESS 6.0) + set(CMAKE_OBJC17_STANDARD_COMPILE_OPTION "-std=c17") + set(CMAKE_OBJC17_EXTENSION_COMPILE_OPTION "-std=gnu17") + set(CMAKE_OBJC17_STANDARD__HAS_FULL_SUPPORT ON) +endif() + +if(NOT CMAKE_OBJC_COMPILER_VERSION VERSION_LESS 9.0) + set(CMAKE_OBJC23_STANDARD_COMPILE_OPTION "-std=c2x") + set(CMAKE_OBJC23_EXTENSION_COMPILE_OPTION "-std=gnu2x") + set(CMAKE_OBJC23_STANDARD__HAS_FULL_SUPPORT ON) +endif() + __compiler_check_default_language_standard(OBJC 3.4 99 3.6 11) |