Переглянути джерело

ERR: allow *.cpp as well as *.cxx etc etc

John Biddiscombe 24 роки тому
батько
коміт
8b5d6918ab
1 змінених файлів з 11 додано та 0 видалено
  1. 11 0
      Source/cmSourceFile.cxx

+ 11 - 0
Source/cmSourceFile.cxx

@@ -108,6 +108,17 @@ void cmSourceFile::SetName(const char* name, const char* dir)
     m_FullPath = hname;
     return;
   }
+  //
+  hname = pathname;
+  hname += ".cpp";
+  if(cmSystemTools::FileExists(hname.c_str()))
+    {
+    m_SourceExtension = "cpp";
+    m_HeaderFileOnly = false;
+    m_FullPath = hname;
+    return;
+    }
+
   hname = pathname;
   hname += ".h";
   if(cmSystemTools::FileExists(hname.c_str()))