Просмотр исходного кода

BUG: HasCXX did not use GetFileFormat and was broken

Bill Hoffman 23 лет назад
Родитель
Сommit
94c396184e
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      Source/cmTarget.cxx

+ 2 - 2
Source/cmTarget.cxx

@@ -243,8 +243,8 @@ bool cmTarget::HasCxx() const
   for(std::vector<cmSourceFile*>::const_iterator i =  m_SourceFiles.begin();
       i != m_SourceFiles.end(); ++i)
     {
-    if((*i)->GetSourceExtension() != "c" &&
-       (*i)->GetSourceExtension() != "h")
+    if(cmSystemTools::GetFileFormat((*i)->GetSourceExtension().c_str())
+       == cmSystemTools::CXX_FILE_FORMAT)
       {
       return true;
       }