ENH: try to handle more source file types
This commit is contained in:
parent
89b31c4f81
commit
987c7a094f
|
@ -364,19 +364,24 @@ cmGlobalXCodeGenerator::CreateXCodeSourceFile(cmLocalGenerator* lg,
|
||||||
const char* lang =
|
const char* lang =
|
||||||
this->GetLanguageFromExtension(sf->GetSourceExtension().c_str());
|
this->GetLanguageFromExtension(sf->GetSourceExtension().c_str());
|
||||||
std::string sourcecode = "sourcecode";
|
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";
|
sourcecode = "compiled.mach-o.objfile";
|
||||||
}
|
}
|
||||||
else if(sf->GetSourceExtension() == "mm")
|
else if(ext == "mm")
|
||||||
{
|
{
|
||||||
sourcecode += ".cpp.objcpp";
|
sourcecode += ".cpp.objcpp";
|
||||||
}
|
}
|
||||||
|
else if(ext == "m")
|
||||||
|
{
|
||||||
|
sourcecode += ".cpp.objc";
|
||||||
|
}
|
||||||
else if(!lang)
|
else if(!lang)
|
||||||
{
|
{
|
||||||
std::string ext = ".";
|
|
||||||
ext = sf->GetSourceExtension();
|
|
||||||
sourcecode += ext;
|
sourcecode += ext;
|
||||||
|
sourcecode += ".";
|
||||||
sourcecode += ext;
|
sourcecode += ext;
|
||||||
}
|
}
|
||||||
else if(strcmp(lang, "C") == 0)
|
else if(strcmp(lang, "C") == 0)
|
||||||
|
|
Loading…
Reference in New Issue