Przeglądaj źródła

BUG: HasCXX did not use GetFileFormat and was broken

Bill Hoffman 22 lat temu
rodzic
commit
94c396184e
1 zmienionych plików z 2 dodań i 2 usunięć
  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;
       }