CMAKE_<LANG>_COMPILER_LAUNCHER does not support OBJC, OBJCXX
CMake 3.16 learned how to distinguish between C/Obj-C and C++/Obj-C++, which is useful for mixed-language projects. However if you enable OBJC/OBJCXX support in CMake, you can no longer use the <LANG>_COMPILER_LAUNCHER
property to prefix the compile line with a tool like ccache, as C_COMPILER_LAUNCHER
/CXX_COMPILER_LAUNCHER
no longer apply and OBJC_COMPILER_LAUNCHER
/OBJCXX_COMPILER_LAUNCHER
are ignored.
This looks to be a simple omission -- I see that there's a hard-coded set of languages that are considered eligible for a compiler launcher, and OBJC/OBJCXX are not in the list.
Expected behaviour:
When the OBJC/OBJCXX languages are enabled, the CMAKE_<LANG>_COMPILER_LAUNCHER
variables (and corresponding properties) are honoured.
Actual behaviour:
When enabling OBJC/OBJCXX, you lose the ability to set a compiler launcher for sources with those languages.
Tested under CMake 3.16.2