Commit d9b5f0a3 authored by Stephen Kelly's avatar Stephen Kelly
Browse files

cmTarget: Remove target name from parameter list

Use the member state instead.
parent 1c70c6cc
......@@ -1242,7 +1242,7 @@ void cmMakefile::AddLinkLibraryForTarget(const std::string& target,
<< "to executables with the ENABLE_EXPORTS property set.";
this->IssueMessage(cmake::FATAL_ERROR, e.str());
}
t->AddLinkLibrary(*this, target, lib, llt);
t->AddLinkLibrary(*this, lib, llt);
}
void cmMakefile::InitializeFromParent(cmMakefile* parent)
......@@ -1808,7 +1808,7 @@ void cmMakefile::SetProjectName(std::string const& p)
this->StateSnapshot.SetProjectName(p);
}
void cmMakefile::AddGlobalLinkInformation(const std::string& name,
void cmMakefile::AddGlobalLinkInformation(const std::string& /* name */,
cmTarget& target)
{
// for these targets do not add anything
......@@ -1838,7 +1838,7 @@ void cmMakefile::AddGlobalLinkInformation(const std::string& name,
this->LinkLibraries.begin();
for (; i != this->LinkLibraries.end(); ++i) {
// This is equivalent to the target_link_libraries plain signature.
target.AddLinkLibrary(*this, name, i->first, i->second);
target.AddLinkLibrary(*this, i->first, i->second);
target.AppendProperty(
"INTERFACE_LINK_LIBRARIES",
target.GetDebugGeneratorExpressions(i->first, i->second).c_str());
......
......@@ -578,8 +578,7 @@ void cmTarget::GetTllSignatureTraces(std::ostream& s, TLLSignature sig) const
}
}
void cmTarget::AddLinkLibrary(cmMakefile& mf, const std::string& target,
const std::string& lib,
void cmTarget::AddLinkLibrary(cmMakefile& mf, const std::string& lib,
cmTargetLinkLibraryType llt)
{
cmTarget* tgt = this->Makefile->FindTargetToUse(lib);
......@@ -597,7 +596,7 @@ void cmTarget::AddLinkLibrary(cmMakefile& mf, const std::string& target,
if (cmGeneratorExpression::Find(lib) != std::string::npos ||
(tgt && tgt->GetType() == cmState::INTERFACE_LIBRARY) ||
(target == lib)) {
(this->Name == lib)) {
return;
}
......@@ -615,7 +614,7 @@ void cmTarget::AddLinkLibrary(cmMakefile& mf, const std::string& target,
// and we removing one instance will break the link line. Duplicates
// will be appropriately eliminated at emit time.
if (this->RecordDependencies) {
std::string targetEntry = target;
std::string targetEntry = this->Name;
targetEntry += "_LIB_DEPENDS";
std::string dependencies;
const char* old_val = mf.GetDefinition(targetEntry);
......
......@@ -142,8 +142,8 @@ public:
*/
void ClearDependencyInformation(cmMakefile& mf, const std::string& target);
void AddLinkLibrary(cmMakefile& mf, const std::string& target,
const std::string& lib, cmTargetLinkLibraryType llt);
void AddLinkLibrary(cmMakefile& mf, const std::string& lib,
cmTargetLinkLibraryType llt);
enum TLLSignature
{
KeywordTLLSignature,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment