summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-08-05 14:31:04 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-08-05 14:31:18 (GMT)
commit26a3bccb60b1ba97b528187c244acf4c3bbceb3e (patch)
tree1225e04dbc03fab2919d28c2c228a49fa07840b3 /Source
parente9ade44cb13c35994d65ef6ae125e97c5514ba9b (diff)
parentf6d6dbc2933248dc7f17fd033e2b70fb161fddbd (diff)
downloadCMake-26a3bccb60b1ba97b528187c244acf4c3bbceb3e.zip
CMake-26a3bccb60b1ba97b528187c244acf4c3bbceb3e.tar.gz
CMake-26a3bccb60b1ba97b528187c244acf4c3bbceb3e.tar.bz2
Merge topic 'link-library-file-flag'
f6d6dbc293 Make CMAKE_LINK_LIBRARY_FILE_FLAG work like CMAKE_LINK_LIBRARY_FLAG Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3641
Diffstat (limited to 'Source')
-rw-r--r--Source/cmComputeLinkInformation.cxx10
-rw-r--r--Source/cmComputeLinkInformation.h5
-rw-r--r--Source/cmLinkLineComputer.cxx1
3 files changed, 6 insertions, 10 deletions
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index 78cddf0..5f46631 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -990,11 +990,6 @@ void cmComputeLinkInformation::AddTargetItem(std::string const& item,
return;
}
- // If this platform wants a flag before the full path, add it.
- if (!this->LibLinkFileFlag.empty()) {
- this->Items.emplace_back(this->LibLinkFileFlag, false);
- }
-
// For compatibility with CMake 2.4 include the item's directory in
// the linker search path.
if (this->OldLinkDirMode && !target->IsFrameworkOnApple() &&
@@ -1057,11 +1052,6 @@ void cmComputeLinkInformation::AddFullItem(std::string const& item)
this->OldLinkDirItems.push_back(item);
}
- // If this platform wants a flag before the full path, add it.
- if (!this->LibLinkFileFlag.empty()) {
- this->Items.emplace_back(this->LibLinkFileFlag, false);
- }
-
// Now add the full path to the library.
this->Items.emplace_back(item, true);
}
diff --git a/Source/cmComputeLinkInformation.h b/Source/cmComputeLinkInformation.h
index 3be2c7f..784d3fa 100644
--- a/Source/cmComputeLinkInformation.h
+++ b/Source/cmComputeLinkInformation.h
@@ -56,6 +56,11 @@ public:
std::string GetChrpathString() const;
std::set<cmGeneratorTarget const*> const& GetSharedLibrariesLinked() const;
+ std::string const& GetLibLinkFileFlag() const
+ {
+ return this->LibLinkFileFlag;
+ }
+
std::string const& GetRPathLinkFlag() const { return this->RPathLinkFlag; }
std::string GetRPathLinkString() const;
diff --git a/Source/cmLinkLineComputer.cxx b/Source/cmLinkLineComputer.cxx
index 8746b35..4430f97 100644
--- a/Source/cmLinkLineComputer.cxx
+++ b/Source/cmLinkLineComputer.cxx
@@ -63,6 +63,7 @@ std::string cmLinkLineComputer::ComputeLinkLibs(cmComputeLinkInformation& cli)
continue;
}
if (item.IsPath) {
+ linkLibs += cli.GetLibLinkFileFlag();
linkLibs +=
this->ConvertToOutputFormat(this->ConvertToLinkReference(item.Value));
} else {