[cmake-developers] Objective-C support

Steve Wilson stevew at wolfram.com
Fri Feb 14 15:08:59 EST 2014


On Feb 14, 2014, at 12:06 PM, Brad King <brad.king at kitware.com> wrote:

> 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.  

There isn’t anything specific in the code to make an accounting for this type of requirement.   I’ll see what I can do and update the tests.

> 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.

I don’t have a strong preference, but the preference I do have is for the OBJC (OBJCXX) form simply because it matches the capital cases of C and CXX in the CMAKE_* variables, which is the most common language type that users encounter.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 236 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20140214/92e802ec/attachment-0002.sig>


More information about the cmake-developers mailing list