Synchronize extension lists

This commit is contained in:
Andy Cedilnik 2003-03-13 12:24:16 -05:00
parent d9cda28701
commit 84d15bf00e
2 changed files with 33 additions and 15 deletions

View File

@ -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();
}

View File

@ -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" ||
if (
ext == "C" || ext == ".C" ||
ext == "M" || ext == ".M" ||
ext == "c++" || ext == ".c++" ||
ext == "mm" || ext == ".mm" ||
ext == "cc" || ext == ".cc" ) { return cmSystemTools::CXX_FILE_FORMAT; }
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" ||
if (
ext == "h" || ext == ".h" ||
ext == "h++" || ext == ".h++" ||
ext == "hxx" || ext == ".hxx" ) { return cmSystemTools::HEADER_FILE_FORMAT; }
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" ||