BUG: Fix crash on circular target dependencies

After reporting an error about circular target dependencies do not try
to continue generation because the dependency computation object is not
in a useful state.
This commit is contained in:
Brad King 2008-08-06 17:48:44 -04:00
parent e0f59d9af5
commit 578e83501b
1 changed files with 4 additions and 1 deletions

View File

@ -860,7 +860,10 @@ void cmGlobalGenerator::Generate()
// Compute the inter-target dependencies.
{
cmComputeTargetDepends ctd(this);
ctd.Compute();
if(!ctd.Compute())
{
return;
}
std::vector<cmTarget*> const& targets = ctd.GetTargets();
for(std::vector<cmTarget*>::const_iterator ti = targets.begin();
ti != targets.end(); ++ti)