summaryrefslogtreecommitdiff
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-10-25 12:43:00 +0100
committerStephen Kelly <steveire@gmail.com>2015-10-27 07:44:24 +0100
commita67231ac114235f0af4673235c4c07fa896c8ab6 (patch)
tree0c23756461e3a26b8a27fc3e340c928b1ca7f62a /Source/cmMakefile.cxx
parentd566f39a640297114bd3ad933bb3279440b2f38f (diff)
downloadcmake-a67231ac114235f0af4673235c4c07fa896c8ab6.tar.gz
cmTarget: Implement ALIAS in terms of name mapping
Remove mapping to cmTarget.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx13
1 files changed, 8 insertions, 5 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index d9d773d4b1..8f72f67b56 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 );