BUG: fix segfault when trying to get the object file for a sourcefile in an

unknown language via GET_TARGET_PROPERTY(), as reported by Trevor Kellaway

Alex
This commit is contained in:
Alexander Neundorf 2007-05-15 16:06:18 -04:00
parent 93b94ce443
commit 4b33244ea5
1 changed files with 15 additions and 12 deletions

View File

@ -1303,6 +1303,8 @@ void cmTarget::ComputeObjectFiles()
const char* lang = this->Makefile->GetLocalGenerator()->
GetGlobalGenerator()->
GetLanguageFromExtension(sf->GetSourceExtension().c_str());
if (lang)
{
std::string lookupObj = objExtensionLookup1 + lang;
lookupObj += objExtensionLookup2;
const char* obj = this->Makefile->GetDefinition(lookupObj.c_str());
@ -1321,6 +1323,7 @@ void cmTarget::ComputeObjectFiles()
}
}
}
}
this->SetProperty("OBJECT_FILES", objectFiles.c_str());
}