diff options
author | Stephen Kelly <steveire@gmail.com> | 2016-10-07 18:13:36 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2016-10-07 18:13:36 (GMT) |
commit | d9b5f0a301c23c2c0e56ad3fcb696de71c3d6365 (patch) | |
tree | ae661ec00676dba7937b2b2b279036f3b27e50fd | |
parent | 1c70c6cc09f0f8be087db2aeae5ee6a3f1b47bda (diff) | |
download | CMake-d9b5f0a301c23c2c0e56ad3fcb696de71c3d6365.zip CMake-d9b5f0a301c23c2c0e56ad3fcb696de71c3d6365.tar.gz CMake-d9b5f0a301c23c2c0e56ad3fcb696de71c3d6365.tar.bz2 |
cmTarget: Remove target name from parameter list
Use the member state instead.
-rw-r--r-- | Source/cmMakefile.cxx | 6 | ||||
-rw-r--r-- | Source/cmTarget.cxx | 7 | ||||
-rw-r--r-- | Source/cmTarget.h | 4 |
3 files changed, 8 insertions, 9 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index ae2d776..4763d83 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -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()); diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 86a2777..651bcc8 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -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); diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 8fbb42f..3d88688 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -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, |