diff options
author | Brad King <brad.king@kitware.com> | 2010-08-31 18:38:18 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2010-08-31 18:38:18 (GMT) |
commit | 6c155d9e9eb77a4cbbab424c1b95ece1904f7e60 (patch) | |
tree | 06315f5cc69134c37f384ae02d7e9bf050a937d1 /Source/cmGlobalGenerator.cxx | |
parent | 0642c758cc529818cfc4a1998b7fd9e77454b6c3 (diff) | |
parent | a99f6208349c6ef93cd2fe558d3a6e9aa1194251 (diff) | |
download | CMake-6c155d9e9eb77a4cbbab424c1b95ece1904f7e60.zip CMake-6c155d9e9eb77a4cbbab424c1b95ece1904f7e60.tar.gz CMake-6c155d9e9eb77a4cbbab424c1b95ece1904f7e60.tar.bz2 |
Merge topic 'vs-utility-depends'
a99f620 Fix unused parameter warning in VS 7.1 generator
79a88c3 Refactor VS <= 7.1 utility-depends workaround
325bdb2 Factor out duplicate VS target dependency code
6bea843 Factor out global generator ComputeTargetDepends method
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 fbc578b..944c1fc 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. |