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:
parent
93b94ce443
commit
4b33244ea5
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue