浏览代码

ENH: try to handle more source file types

Bill Hoffman 20 年之前
父节点
当前提交
987c7a094f
共有 1 个文件被更改,包括 9 次插入4 次删除
  1. 9 4
      Source/cmGlobalXCodeGenerator.cxx

+ 9 - 4
Source/cmGlobalXCodeGenerator.cxx

@@ -364,19 +364,24 @@ cmGlobalXCodeGenerator::CreateXCodeSourceFile(cmLocalGenerator* lg,
   const char* lang = 
     this->GetLanguageFromExtension(sf->GetSourceExtension().c_str());
   std::string sourcecode = "sourcecode";
-  if(sf->GetSourceExtension() == "o")
+  std::string ext = sf->GetSourceExtension();
+  ext = cmSystemTools::LowerCase(ext);
+  if(ext == "o")
     {
     sourcecode = "compiled.mach-o.objfile";
     }
-  else if(sf->GetSourceExtension() == "mm")
+  else if(ext == "mm")
     {
     sourcecode += ".cpp.objcpp";
     }
+  else if(ext == "m")
+    {
+    sourcecode += ".cpp.objc";
+    }
   else if(!lang)
     {
-    std::string ext = ".";
-    ext = sf->GetSourceExtension();
     sourcecode += ext;
+    sourcecode += ".";
     sourcecode += ext;
     }
   else if(strcmp(lang, "C") == 0)