diff options
author | Brad King <brad.king@kitware.com> | 2018-09-10 17:07:50 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-09-12 16:46:51 (GMT) |
commit | 9bbae5ae2870082a3e62596e25f53dcdadaa51a9 (patch) | |
tree | aaf68260346a38625323889ef9344bb287fc7a07 /Source/cmTarget.cxx | |
parent | f9cb6f618a72b0aa129006b79311f1fa7c9197bc (diff) | |
download | CMake-9bbae5ae2870082a3e62596e25f53dcdadaa51a9.zip CMake-9bbae5ae2870082a3e62596e25f53dcdadaa51a9.tar.gz CMake-9bbae5ae2870082a3e62596e25f53dcdadaa51a9.tar.bz2 |
cmTarget: Future-proof AddLinkLibrary target lookup scope
The `AddLinkLibrary` method takes a `cmMakefile` pointer to represent
the scope of the caller that wants to link to the named library.
Currently in all call sites this is the same as the target's `Makefile`
member, but in principle the library named by the caller is visible in
its scope so we should use the `cmMakefile` it provided to look up the
library target.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index cfcb31a..927b218 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -745,7 +745,7 @@ void cmTarget::GetTllSignatureTraces(std::ostream& s, TLLSignature sig) const void cmTarget::AddLinkLibrary(cmMakefile& mf, const std::string& lib, cmTargetLinkLibraryType llt) { - cmTarget* tgt = this->Makefile->FindTargetToUse(lib); + cmTarget* tgt = mf.FindTargetToUse(lib); { const bool isNonImportedTarget = tgt && !tgt->IsImported(); |