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:
parent
e0f59d9af5
commit
578e83501b
@ -860,7 +860,10 @@ void cmGlobalGenerator::Generate()
|
|||||||
// Compute the inter-target dependencies.
|
// Compute the inter-target dependencies.
|
||||||
{
|
{
|
||||||
cmComputeTargetDepends ctd(this);
|
cmComputeTargetDepends ctd(this);
|
||||||
ctd.Compute();
|
if(!ctd.Compute())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
std::vector<cmTarget*> const& targets = ctd.GetTargets();
|
std::vector<cmTarget*> const& targets = ctd.GetTargets();
|
||||||
for(std::vector<cmTarget*>::const_iterator ti = targets.begin();
|
for(std::vector<cmTarget*>::const_iterator ti = targets.begin();
|
||||||
ti != targets.end(); ++ti)
|
ti != targets.end(); ++ti)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user