Unintuitive handling of C/C++ language standards for OBJC and OBJCXX
The OBJC and OBJCXX languages are somewhat of a special case. There are no formal Objective C or C++ standards from what I can tell (as mentioned in my comment on another issue). When talking about language standards for OBJC/OBJCXX files (i.e. .m
and .mm
), it is almost certainly going to be the C and C++ standards that the user/project will be referring to.
When the OBJC and OBJCXX languages are not enabled, any .m
or .mm
files pick up the relevant C or C++ standard from the C_STANDARD
or CXX_STANDARD
target properties. This is what happens with CMake 3.15 or earlier and has been working fine. But if OBJC or OBJCXX languages are enabled for existing projects that were relying on that behavior, they will stop working because the C/C++ standards will no longer be enforced. The projects would have to be updated to set OBJC_STANDARD
and OBJCXX_STANDARD
, even though it's still really the C/C++ standards that they want to specify. This seems unnecessary and likely to cause problems for users if left as currently implemented in CMake 3.16.0-rc3.