diff options
author | Stephen Kelly <steveire@gmail.com> | 2016-10-07 18:13:35 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2016-10-07 18:13:35 (GMT) |
commit | 7ba954925a876f4c753a4296236bc7d2f18eb0b8 (patch) | |
tree | a15f74014508d6fb3fcedd989f563e0debd93859 | |
parent | 6d98b15fc8b9a065325e3683afe94efce17dd162 (diff) | |
download | CMake-7ba954925a876f4c753a4296236bc7d2f18eb0b8.zip CMake-7ba954925a876f4c753a4296236bc7d2f18eb0b8.tar.gz CMake-7ba954925a876f4c753a4296236bc7d2f18eb0b8.tar.bz2 |
cmMakefile: Use public API to find a target
-rw-r--r-- | Source/cmMakefile.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 7e26bff..d2be29c 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1248,14 +1248,15 @@ void cmMakefile::AddLinkLibraryForTarget(const std::string& target, void cmMakefile::AddLinkDirectoryForTarget(const std::string& target, const std::string& d) { - cmTargets::iterator i = this->Targets.find(target); - if (i == this->Targets.end()) { + cmTarget* t = this->FindLocalNonAliasTarget(target); + if (!t) { cmSystemTools::Error( "Attempt to add link directories to non-existent target: ", target.c_str(), " for directory ", d.c_str()); return; } - i->second.AddLinkDirectory(d); + + t->AddLinkDirectory(d); } void cmMakefile::InitializeFromParent(cmMakefile* parent) |