From 9bbae5ae2870082a3e62596e25f53dcdadaa51a9 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 10 Sep 2018 13:07:50 -0400 Subject: 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. --- Source/cmTarget.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); -- cgit v0.12