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:
David Cole 2011-08-16 17:02:43 -04:00 committed by CMake Topic Stage
commit 522c263d9d
1 changed files with 5 additions and 3 deletions

View File

@ -276,9 +276,11 @@ void cmComputeTargetDepends::AddTargetDepend(int depender_index,
for(std::set<cmStdString>::const_iterator i = utils.begin(); for(std::set<cmStdString>::const_iterator i = utils.begin();
i != utils.end(); ++i) i != utils.end(); ++i)
{ {
cmTarget* transitive_dependee = if(cmTarget* transitive_dependee =
dependee->GetMakefile()->FindTargetToUse(i->c_str()); dependee->GetMakefile()->FindTargetToUse(i->c_str()))
this->AddTargetDepend(depender_index, transitive_dependee, false); {
this->AddTargetDepend(depender_index, transitive_dependee, false);
}
} }
} }
else else