summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-10-10 14:23:45 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-10-10 14:23:45 (GMT)
commit1e6aaefdeebbf09eaf7fa0e9dbc6a7faa2f9132a (patch)
treedc995bdb1701c8c8088620a5ca343c71087287e0 /Source/cmTarget.cxx
parentea533eb71516a92e1528e358ffa374b16864eac6 (diff)
parenta1cfc4fe3deed4d642773d0ae63dd524c3f2eba1 (diff)
downloadCMake-1e6aaefdeebbf09eaf7fa0e9dbc6a7faa2f9132a.zip
CMake-1e6aaefdeebbf09eaf7fa0e9dbc6a7faa2f9132a.tar.gz
CMake-1e6aaefdeebbf09eaf7fa0e9dbc6a7faa2f9132a.tar.bz2
Merge topic 'clean-up-link-configuration'
a1cfc4fe cmMakefile: Simplify programmer error to an assert 4079ba20 cmMakefile: Implement LinkLibraries as an internal property 17ab8e33 cmMakefile: Inline method into only remaining caller 7edfcd0e cmMakefile: Inline method into caller 6c8dc7f1 cmake: Simplify find-package mode library addition 1efca9f4 cmMakefile: Remove obsolete parameter d9b5f0a3 cmTarget: Remove target name from parameter list 1c70c6cc cmMakefile: Use public API to find a target 2b7baed7 cmMakefile: Inline method into only caller 7ba95492 cmMakefile: Use public API to find a target 6d98b15f cmMakefile: Invert if() condition to remove else 869037ee cmMakefile: Remove ALIAS check 2f6462a6 cmMakefile: Collapse two consecutive if()s into one 148b83a1 cmMakefile: DeMorgan-invert condition 4457a9f1 cmMakefile: Return after error and remove else condition 4d039c5b cmMakefile: Invert handling of error condition ...
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx24
1 files changed, 3 insertions, 21 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 13a4744..651bcc8 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -476,23 +476,6 @@ cmSourceFile* cmTarget::AddSource(const std::string& src)
return this->Makefile->GetOrCreateSource(src);
}
-void cmTarget::MergeLinkLibraries(cmMakefile& mf, const std::string& selfname,
- const LinkLibraryVectorType& libs)
-{
- // Only add on libraries we haven't added on before.
- // Assumption: the global link libraries could only grow, never shrink
- LinkLibraryVectorType::const_iterator i = libs.begin();
- i += this->PrevLinkedLibraries.size();
- for (; i != libs.end(); ++i) {
- // This is equivalent to the target_link_libraries plain signature.
- this->AddLinkLibrary(mf, selfname, i->first, i->second);
- this->AppendProperty(
- "INTERFACE_LINK_LIBRARIES",
- this->GetDebugGeneratorExpressions(i->first, i->second).c_str());
- }
- this->PrevLinkedLibraries = libs;
-}
-
void cmTarget::AddLinkDirectory(const std::string& d)
{
// Make sure we don't add unnecessary search directories.
@@ -595,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);
@@ -614,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;
}
@@ -632,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);