summaryrefslogtreecommitdiff
path: root/Source/cmLinkLineComputer.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2016-10-08 12:21:39 +0200
committerStephen Kelly <steveire@gmail.com>2016-10-10 20:38:59 +0200
commit4134030434ea88024ef46f9f00b19513fc3cec4c (patch)
tree2eab60a4a8704dff0b8cdec8dfc8ccd4fd3288b8 /Source/cmLinkLineComputer.cxx
parentf03d446e967af91460ff31eb52d840983b3d8cec (diff)
downloadcmake-4134030434ea88024ef46f9f00b19513fc3cec4c.tar.gz
cmLinkLineComputer: Extract link libraries computation from cmLocalGenerator
Hide some methods which no longer need to be public.
Diffstat (limited to 'Source/cmLinkLineComputer.cxx')
-rw-r--r--Source/cmLinkLineComputer.cxx25
1 files changed, 25 insertions, 0 deletions
diff --git a/Source/cmLinkLineComputer.cxx b/Source/cmLinkLineComputer.cxx
index 41096ef9e1..24f3578b31 100644
--- a/Source/cmLinkLineComputer.cxx
+++ b/Source/cmLinkLineComputer.cxx
@@ -152,3 +152,28 @@ std::string cmLinkLineComputer::ComputeFrameworkPath(
}
return frameworkPath;
}
+
+std::string cmLinkLineComputer::ComputeLinkLibraries(
+ cmComputeLinkInformation& cli, std::string const& stdLibString)
+{
+ std::ostringstream fout;
+ fout << this->ComputeRPath(cli);
+
+ // Write the library flags to the build rule.
+ fout << this->ComputeLinkLibs(cli);
+
+ // Add the linker runtime search path if any.
+ std::string rpath_link = cli.GetRPathLinkString();
+ if (!cli.GetRPathLinkFlag().empty() && !rpath_link.empty()) {
+ fout << cli.GetRPathLinkFlag();
+ fout << this->OutputConverter->EscapeForShell(rpath_link,
+ !this->ForResponse);
+ fout << " ";
+ }
+
+ if (!stdLibString.empty()) {
+ fout << stdLibString << " ";
+ }
+
+ return fout.str();
+}