summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmTarget.cxx27
1 files changed, 15 insertions, 12 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index a97396f..3e196f5 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -1303,21 +1303,24 @@ void cmTarget::ComputeObjectFiles()
const char* lang = this->Makefile->GetLocalGenerator()->
GetGlobalGenerator()->
GetLanguageFromExtension(sf->GetSourceExtension().c_str());
- std::string lookupObj = objExtensionLookup1 + lang;
- lookupObj += objExtensionLookup2;
- const char* obj = this->Makefile->GetDefinition(lookupObj.c_str());
- if(obj)
+ if (lang)
{
- if(objectFiles.size())
+ std::string lookupObj = objExtensionLookup1 + lang;
+ lookupObj += objExtensionLookup2;
+ const char* obj = this->Makefile->GetDefinition(lookupObj.c_str());
+ if(obj)
{
- objectFiles += ";";
+ if(objectFiles.size())
+ {
+ objectFiles += ";";
+ }
+ std::string objFile = *d;
+ objFile += "/";
+ objFile += this->Makefile->GetLocalGenerator()->
+ GetSourceObjectName(*sf);
+ objFile += obj;
+ objectFiles += objFile;
}
- std::string objFile = *d;
- objFile += "/";
- objFile += this->Makefile->GetLocalGenerator()->
- GetSourceObjectName(*sf);
- objFile += obj;
- objectFiles += objFile;
}
}
}