Skip to content
  • Tim Blechmann's avatar
    Treat .m files consistently as C across all generators · 95cdf132
    Tim Blechmann authored and Brad King's avatar Brad King committed
    
    
    Objective C sources should be compiled with the C compiler, not C++.
    
    The Xcode generator correctly classifies ".m" sources already.  The
    cmSystemTools::GetFileFormat method was fixed by commit v2.8.0~1782 (fix
    for 7045, use gcc for .m, 2008-08-19) but it is not used by any of the
    generator since commit v2.4.0~2819 (major changes to support addition of
    languages, 2004-09-22).
    
    Fix the CMAKE_<LANG>_SOURCE_FILE_EXTENSIONS table entries so that
    cmGlobalGenerator::GetLanguageFromExtension tells the Makefile, Ninja,
    and VS IDE generators to compile ".m" sources as C.  This makes behavior
    consistent on all generators.
    
    Signed-off-by: default avatarTim Blechmann <tim@klingt.org>
    95cdf132