summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-08-06 21:48:44 (GMT)
committerBrad King <brad.king@kitware.com>2008-08-06 21:48:44 (GMT)
commit578e83501becca2aa0b2ff38380e8e2dc7508f7d (patch)
tree601a046c02d8dfb2ad36e5cfe4aa9361da2927b5 /Source/cmGlobalGenerator.cxx
parente0f59d9af5cfc6d57f0b5b2cb004b69be3e30b38 (diff)
downloadCMake-578e83501becca2aa0b2ff38380e8e2dc7508f7d.zip
CMake-578e83501becca2aa0b2ff38380e8e2dc7508f7d.tar.gz
CMake-578e83501becca2aa0b2ff38380e8e2dc7508f7d.tar.bz2
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.
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index cf4abdd..a1f42cf 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -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)