[cmake-developers] Objective-C support

Brad King brad.king at kitware.com
Fri Feb 14 14:06:13 EST 2014


On 2/13/2014 7:35 PM, Steve Wilson wrote:
> The topic name is ‘objective-c-support.’

Currently if CXX is enabled then .m sources get compiled as CXX.
See Modules/CMakeCXXCompiler.cmake.in:

 set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm;CPP)

In order to be compatible we need to make sure that is still
the case.  However, if OBJC is enabled then that should be
preferred to CXX for .m sources.  Is that the case with these
changes?  Please add test cases to cover these combinations.

IMO the capitalization "ObjC" looks nicer than "OBJC" and will
extend better to "ObjCXX" than "OBJCXX".  I have no strong
preference if others disagree though.

Thanks,
-Brad



More information about the cmake-developers mailing list