Commit 26a3bccb authored by Brad King's avatar Brad King Committed by Kitware Robot
Browse files

Merge topic 'link-library-file-flag'

f6d6dbc2

 Make CMAKE_LINK_LIBRARY_FILE_FLAG work like CMAKE_LINK_LIBRARY_FLAG
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !3641
parents e9ade44c f6d6dbc2
......@@ -10,7 +10,7 @@ set(__WINDOWS_OPENWATCOM 1)
set(CMAKE_LIBRARY_PATH_FLAG "libpath ")
set(CMAKE_LINK_LIBRARY_FLAG "library ")
set(CMAKE_LINK_LIBRARY_FILE_FLAG "library")
set(CMAKE_LINK_LIBRARY_FILE_FLAG "library ")
if(CMAKE_VERBOSE_MAKEFILE)
set(CMAKE_WCL_QUIET)
......
......@@ -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);
}
......
......@@ -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;
......
......@@ -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 {
......
Markdown is supported
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