diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 4a9ef30bc..b5f7ffb01 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -38,22 +38,30 @@ cmMakefile::cmMakefile() // Setup the default include complaint regular expression (match nothing). m_ComplainFileRegularExpression = "^$"; // Source and header file extensions that we can handle - m_SourceFileExtensions.push_back( "cxx" ); - m_SourceFileExtensions.push_back( "cpp" ); - m_SourceFileExtensions.push_back( "c" ); + m_SourceFileExtensions.push_back( "C" ); m_SourceFileExtensions.push_back( "M" ); + m_SourceFileExtensions.push_back( "c" ); + m_SourceFileExtensions.push_back( "c++" ); + m_SourceFileExtensions.push_back( "cc" ); + m_SourceFileExtensions.push_back( "cpp" ); + m_SourceFileExtensions.push_back( "cxx" ); m_SourceFileExtensions.push_back( "m" ); m_SourceFileExtensions.push_back( "mm" ); m_HeaderFileExtensions.push_back( "h" ); - m_HeaderFileExtensions.push_back( "txx" ); + m_HeaderFileExtensions.push_back( "h++" ); + m_HeaderFileExtensions.push_back( "hm" ); + m_HeaderFileExtensions.push_back( "hpp" ); + m_HeaderFileExtensions.push_back( "hxx" ); m_HeaderFileExtensions.push_back( "in" ); + m_HeaderFileExtensions.push_back( "txx" ); m_DefineFlags = " "; m_LocalGenerator = 0; this->AddSourceGroup("", "^.*$"); - this->AddSourceGroup("Source Files", "\\.(cpp|C|c|cxx|rc|def|r|odl|idl|hpj|bat)$"); - this->AddSourceGroup("Header Files", "\\.(h|hh|hpp|hxx|hm|inl)$"); + this->AddSourceGroup("Source Files", + "\\.(C|M|c|c++|cc|cpp|cxx|m|mm|rc|def|r|odl|idl|hpj|bat)$"); + this->AddSourceGroup("Header Files", "\\.(h|h++|hm|hpp|hxx|in|txx|inl)$"); this->AddDefaultDefinitions(); } diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 0b32313ef..7a5025601 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -2286,16 +2286,26 @@ cmSystemTools::FileFormat cmSystemTools::GetFileFormat(const char* cext) } std::string ext = cmSystemTools::LowerCase(cext); if ( ext == "c" || ext == ".c" ) { return cmSystemTools::C_FILE_FORMAT; } - if ( ext == "cxx" || ext == ".cxx" || - ext == "cpp" || ext == ".cpp" || - ext == "c++" || ext == ".c++" || - ext == "mm" || ext == ".mm" || - ext == "cc" || ext == ".cc" ) { return cmSystemTools::CXX_FILE_FORMAT; } + if ( + ext == "C" || ext == ".C" || + ext == "M" || ext == ".M" || + ext == "c++" || ext == ".c++" || + ext == "cc" || ext == ".cc" || + ext == "cpp" || ext == ".cpp" || + ext == "cxx" || ext == ".cxx" || + ext == "m" || ext == ".m" || + ext == "mm" || ext == ".mm" + ) { return cmSystemTools::CXX_FILE_FORMAT; } if ( ext == "java" || ext == ".java" ) { return cmSystemTools::JAVA_FILE_FORMAT; } - if ( ext == "h" || ext == ".h" || - ext == "hpp" || ext == ".hpp" || - ext == "h++" || ext == ".h++" || - ext == "hxx" || ext == ".hxx" ) { return cmSystemTools::HEADER_FILE_FORMAT; } + if ( + ext == "h" || ext == ".h" || + ext == "h++" || ext == ".h++" || + ext == "hm" || ext == ".hm" || + ext == "hpp" || ext == ".hpp" || + ext == "hxx" || ext == ".hxx" || + ext == "in" || ext == ".in" || + ext == "txx" || ext == ".txx" + ) { return cmSystemTools::HEADER_FILE_FORMAT; } if ( ext == "rc" || ext == ".rc" ) { return cmSystemTools::RESOURCE_FILE_FORMAT; } if ( ext == "def" || ext == ".def" ) { return cmSystemTools::DEFINITION_FILE_FORMAT; } if ( ext == "lib" || ext == ".lib" ||