diff options
author | Brad King <brad.king@kitware.com> | 2010-08-24 22:12:44 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2010-08-24 22:12:44 (GMT) |
commit | 6bea84353c76d392a9da11557ab888fa18ea1955 (patch) | |
tree | 653831a67fff9fac70643c321bc4253d9e391d66 /Source/cmGlobalGenerator.cxx | |
parent | e752cff8fd9c5f27e066d5916221bd609bfeba29 (diff) | |
download | CMake-6bea84353c76d392a9da11557ab888fa18ea1955.zip CMake-6bea84353c76d392a9da11557ab888fa18ea1955.tar.gz CMake-6bea84353c76d392a9da11557ab888fa18ea1955.tar.bz2 |
Factor out global generator ComputeTargetDepends method
Put the global dependency analysis in its own method so individual
generators can hook into this point.
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index bd26b5f..bd0d199 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -863,19 +863,10 @@ void cmGlobalGenerator::Generate() } // Compute the inter-target dependencies. - { - cmComputeTargetDepends ctd(this); - if(!ctd.Compute()) + if(!this->ComputeTargetDepends()) { return; } - std::vector<cmTarget*> const& targets = ctd.GetTargets(); - for(std::vector<cmTarget*>::const_iterator ti = targets.begin(); - ti != targets.end(); ++ti) - { - ctd.GetTargetDirectDepends(*ti, this->TargetDependencies[*ti]); - } - } // Create a map from local generator to the complete set of targets // it builds by default. @@ -908,6 +899,23 @@ void cmGlobalGenerator::Generate() } //---------------------------------------------------------------------------- +bool cmGlobalGenerator::ComputeTargetDepends() +{ + cmComputeTargetDepends ctd(this); + if(!ctd.Compute()) + { + return false; + } + std::vector<cmTarget*> const& targets = ctd.GetTargets(); + for(std::vector<cmTarget*>::const_iterator ti = targets.begin(); + ti != targets.end(); ++ti) + { + ctd.GetTargetDirectDepends(*ti, this->TargetDependencies[*ti]); + } + return true; +} + +//---------------------------------------------------------------------------- bool cmGlobalGenerator::CheckTargets() { // Make sure all targets can find their source files. |