diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-10-18 21:49:12 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-10-24 07:19:52 (GMT) |
commit | a6b7eb5bc8c304dab2102689eb09ec85c1e7f6be (patch) | |
tree | c54dcd116704299bff1004d38e56469fba036b72 /Source | |
parent | c2c239e607549d6513d95c3e919b4f509733bc87 (diff) | |
download | CMake-a6b7eb5bc8c304dab2102689eb09ec85c1e7f6be.zip CMake-a6b7eb5bc8c304dab2102689eb09ec85c1e7f6be.tar.gz CMake-a6b7eb5bc8c304dab2102689eb09ec85c1e7f6be.tar.bz2 |
cmInstallTargetGenerator: Get a cmGeneratorTarget directly.
Extend the cmGeneratorTarget API to make this possible.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmInstallTargetGenerator.cxx | 3 | ||||
-rw-r--r-- | Source/cmLocalGenerator.cxx | 7 | ||||
-rw-r--r-- | Source/cmLocalGenerator.h | 1 |
3 files changed, 9 insertions, 2 deletions
diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx index a97cc5f..7a10356 100644 --- a/Source/cmInstallTargetGenerator.cxx +++ b/Source/cmInstallTargetGenerator.cxx @@ -440,8 +440,7 @@ cmInstallTargetGenerator::GetInstallFilename(cmGeneratorTarget const* target, void cmInstallTargetGenerator::Compute(cmLocalGenerator* lg) { - this->Target = lg->GetGlobalGenerator()->GetGeneratorTarget( - lg->GetMakefile()->FindTarget(this->TargetName)); + this->Target = lg->FindGeneratorTarget(this->TargetName); } //---------------------------------------------------------------------------- diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 6959e1d..3658473 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -453,6 +453,13 @@ void cmLocalGenerator::AddGeneratorTarget(cmGeneratorTarget* gt) this->GeneratorTargets.push_back(gt); } +cmGeneratorTarget* cmLocalGenerator::FindGeneratorTarget( + const std::string& name) const +{ + return this->GetGlobalGenerator()->GetGeneratorTarget( + this->Makefile->FindTarget(name)); +} + //---------------------------------------------------------------------------- void cmLocalGenerator::ComputeTargetManifest() { diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 1375985..552020b 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -120,6 +120,7 @@ public: void AddGeneratorTarget(cmGeneratorTarget* gt); + cmGeneratorTarget* FindGeneratorTarget(const std::string& name) const; cmGeneratorTarget* FindGeneratorTargetToUse(const std::string& name) const; /** |