diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-10-25 11:43:00 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-10-27 06:44:24 (GMT) |
commit | a67231ac114235f0af4673235c4c07fa896c8ab6 (patch) | |
tree | 0c23756461e3a26b8a27fc3e340c928b1ca7f62a /Source/cmMakefile.cxx | |
parent | d566f39a640297114bd3ad933bb3279440b2f38f (diff) | |
download | CMake-a67231ac114235f0af4673235c4c07fa896c8ab6.zip CMake-a67231ac114235f0af4673235c4c07fa896c8ab6.tar.gz CMake-a67231ac114235f0af4673235c4c07fa896c8ab6.tar.bz2 |
cmTarget: Implement ALIAS in terms of name mapping
Remove mapping to cmTarget.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index d9d773d..8f72f67 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -2036,10 +2036,11 @@ void cmMakefile::AddGlobalLinkInformation(const std::string& name, } -void cmMakefile::AddAlias(const std::string& lname, cmTarget *tgt) +void cmMakefile::AddAlias(const std::string& lname, + std::string const& tgtName) { - this->AliasTargets[lname] = tgt; - this->GetGlobalGenerator()->AddAlias(lname, tgt); + this->AliasTargets[lname] = tgtName; + this->GetGlobalGenerator()->AddAlias(lname, tgtName); } cmTarget* cmMakefile::AddLibrary(const std::string& lname, @@ -4024,10 +4025,12 @@ cmTarget* cmMakefile::FindTarget(const std::string& name, { if (!excludeAliases) { - TargetMap::const_iterator i = this->AliasTargets.find(name); + std::map<std::string, std::string>::const_iterator i = + this->AliasTargets.find(name); if (i != this->AliasTargets.end()) { - return i->second; + cmTargets::iterator ai = this->Targets.find(i->second); + return &ai->second; } } cmTargets::iterator i = this->Targets.find( name ); |