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.
This commit is contained in:
parent
f9cb6f618a
commit
9bbae5ae28
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user