Merge topic 'fix-imported-target-depend-crash'
8ee9bbb
Do not crash when an imported target depends on a missing target
This commit is contained in:
commit
522c263d9d
|
@ -276,11 +276,13 @@ void cmComputeTargetDepends::AddTargetDepend(int depender_index,
|
|||
for(std::set<cmStdString>::const_iterator i = utils.begin();
|
||||
i != utils.end(); ++i)
|
||||
{
|
||||
cmTarget* transitive_dependee =
|
||||
dependee->GetMakefile()->FindTargetToUse(i->c_str());
|
||||
if(cmTarget* transitive_dependee =
|
||||
dependee->GetMakefile()->FindTargetToUse(i->c_str()))
|
||||
{
|
||||
this->AddTargetDepend(depender_index, transitive_dependee, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Lookup the index for this target. All targets should be known by
|
||||
|
|
Loading…
Reference in New Issue