Update ObjectiveC C17 / C23 support
Hello,
Related to #17755 (closed) the ObjectiveC language support needs an update for C17/C23. If I configure the following with Xcode 13 (beta):
cmake_minimum_required(VERSION 3.20)
project(objctest LANGUAGES C OBJC)
message(STATUS "CMAKE_C_STANDARD_COMPUTED_DEFAULT=${CMAKE_C_STANDARD_COMPUTED_DEFAULT}")
message(STATUS "CMAKE_OBJC_STANDARD_COMPUTED_DEFAULT=${CMAKE_OBJC_STANDARD_COMPUTED_DEFAULT}")
add_library(dummy STATIC dummy.m)
I get the following output:
-- The C compiler identification is AppleClang 13.0.0.13000018
-- The OBJC compiler identification is AppleClang 13.0.0.13000018
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting OBJC compiler ABI info
-- Detecting OBJC compiler ABI info - done
-- Check for working OBJC compiler: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- CMAKE_C_STANDARD_COMPUTED_DEFAULT=17
-- CMAKE_OBJC_STANDARD_COMPUTED_DEFAULT=11
-- Configuring done
CMake Error at CMakeLists.txt:7 (add_library):
OBJC_STANDARD is set to invalid value '17'
-- Generating done
CMake Generate step failed. Build files cannot be regenerated correctly.
Could you please have a look? This test case is part of the RunCMake.XcodeProject / XcodeObjcFlags
CMake test.
Thanks, Gregor