diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-09-16 03:21:07 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-10-14 17:32:09 (GMT) |
commit | 2293d43d00ddcff86c70f0b06014223f3b01e36c (patch) | |
tree | a5a581e0637bd509f0802f979745bcc4678f4c31 /Source/cmLocalGenerator.cxx | |
parent | 488723f5cd9bec3f7b35b26c89ce2d92ad7d4db4 (diff) | |
download | CMake-2293d43d00ddcff86c70f0b06014223f3b01e36c.zip CMake-2293d43d00ddcff86c70f0b06014223f3b01e36c.tar.gz CMake-2293d43d00ddcff86c70f0b06014223f3b01e36c.tar.bz2 |
cmLocalGenerator: Store cmGeneratorTargets.
Relieve cmMakefile of this responsibility.
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index f19d551..3691b41 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -132,7 +132,7 @@ void cmLocalGenerator::TraceDependencies() this->GlobalGenerator->CreateEvaluationSourceFiles(*ci); } // Generate the rule files for each target. - cmGeneratorTargetsType targets = this->Makefile->GetGeneratorTargets(); + cmGeneratorTargetsType targets = this->GetGeneratorTargets(); for(cmGeneratorTargetsType::iterator t = targets.begin(); t != targets.end(); ++t) { @@ -448,6 +448,13 @@ void cmLocalGenerator::GenerateInstallRules() } } + +void cmLocalGenerator::AddGeneratorTarget(cmTarget* t, cmGeneratorTarget* gt) +{ + this->GeneratorTargets[t] = gt; + this->GetGlobalGenerator()->AddGeneratorTarget(t, gt); +} + //---------------------------------------------------------------------------- void cmLocalGenerator::ComputeTargetManifest() { @@ -460,7 +467,7 @@ void cmLocalGenerator::ComputeTargetManifest() } // Add our targets to the manifest for each configuration. - cmGeneratorTargetsType targets = this->Makefile->GetGeneratorTargets(); + cmGeneratorTargetsType targets = this->GetGeneratorTargets(); for(cmGeneratorTargetsType::iterator t = targets.begin(); t != targets.end(); ++t) { @@ -1767,6 +1774,17 @@ void cmLocalGenerator::AddLanguageFlags(std::string& flags, } //---------------------------------------------------------------------------- +cmGeneratorTarget* +cmLocalGenerator::FindGeneratorTargetToUse(const std::string& name) const +{ + if (cmTarget *t = this->Makefile->FindTargetToUse(name)) + { + return this->GetGlobalGenerator()->GetGeneratorTarget(t); + } + return 0; +} + +//---------------------------------------------------------------------------- bool cmLocalGenerator::GetRealDependency(const std::string& inName, const std::string& config, std::string& dep) @@ -1792,7 +1810,7 @@ bool cmLocalGenerator::GetRealDependency(const std::string& inName, // Look for a CMake target with the given name. if(cmGeneratorTarget* target = - this->Makefile->FindGeneratorTargetToUse(name)) + this->FindGeneratorTargetToUse(name)) { // make sure it is not just a coincidence that the target name // found is part of the inName |