diff options
author | Brad King <brad.king@kitware.com> | 2016-04-05 13:37:59 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-04-05 13:37:59 (GMT) |
commit | adea45e15abf95b53e13ea8564cad9fc8e35ed56 (patch) | |
tree | b8a655cd4d53b8cb5a691b6f88c3f825f617d157 /Source/cmMakefile.cxx | |
parent | 6c60f116cb2bfe6753f526ceacfb5e54bc22efc5 (diff) | |
parent | 0e44f4894f23d5eccd8d360f3420c832f9433a20 (diff) | |
download | CMake-adea45e15abf95b53e13ea8564cad9fc8e35ed56.zip CMake-adea45e15abf95b53e13ea8564cad9fc8e35ed56.tar.gz CMake-adea45e15abf95b53e13ea8564cad9fc8e35ed56.tar.bz2 |
Merge topic 'fix-target-alias-in-subdir'
0e44f489 Rename local target lookup methods to clarify purpose
bc30f8b5 Fix lookup of an ALIAS target outside aliased target's directory (#16044)
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index aa6f7c8..7ca005d 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -4026,25 +4026,13 @@ std::vector<std::string> cmMakefile::GetPropertyKeys() const return this->StateSnapshot.GetDirectory().GetPropertyKeys(); } -cmTarget* cmMakefile::FindTarget(const std::string& name, - bool excludeAliases) const +cmTarget* cmMakefile::FindLocalNonAliasTarget(const std::string& name) const { - if (!excludeAliases) - { - std::map<std::string, std::string>::const_iterator i = - this->AliasTargets.find(name); - if (i != this->AliasTargets.end()) - { - cmTargets::iterator ai = this->Targets.find(i->second); - return &ai->second; - } - } cmTargets::iterator i = this->Targets.find( name ); if ( i != this->Targets.end() ) { return &i->second; } - return 0; } @@ -4215,7 +4203,7 @@ cmTarget* cmMakefile::FindTargetToUse(const std::string& name, } // Look for a target built in this directory. - if(cmTarget* t = this->FindTarget(name, excludeAliases)) + if(cmTarget* t = this->FindLocalNonAliasTarget(name)) { return t; } |