[cmake-developers] [patch] treat .m files as c, not c++

Brad King brad.king at kitware.com
Wed Mar 19 15:58:15 EDT 2014


On 03/19/2014 01:29 PM, Tim Blechmann wrote:
> emulating old bugs is a nice thing, but then maybe the inconsistency between xcode and make/ninja generators should be be documented or the xcode generator should emulate wrong behavior to be consistent with make/ninja?

On second thought, since the Xcode generator already does this correctly
I think it is better to just fix the inconsistency.  I doubt anyone is
intentionally depending on compiling .m sources with the C++ compiler.
If it comes up we can add the CMake Policy for compatibility later.

It looks like this was reported and "fixed" in 2008:

 http://www.cmake.org/Bug/view.php?id=7045

but the fix was not correct because the generators do not use the
cmSystemTools::GetFileFormat hard-coded table anymore.

I'll look at integrating the change.

Thanks,
-Brad




More information about the cmake-developers mailing list