summaryrefslogtreecommitdiffstats
path: root/Source/cmLinkLineComputer.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2016-10-08 10:21:39 (GMT)
committerStephen Kelly <steveire@gmail.com>2016-10-10 18:38:59 (GMT)
commit4134030434ea88024ef46f9f00b19513fc3cec4c (patch)
tree2eab60a4a8704dff0b8cdec8dfc8ccd4fd3288b8 /Source/cmLinkLineComputer.cxx
parentf03d446e967af91460ff31eb52d840983b3d8cec (diff)
downloadCMake-4134030434ea88024ef46f9f00b19513fc3cec4c.zip
CMake-4134030434ea88024ef46f9f00b19513fc3cec4c.tar.gz
CMake-4134030434ea88024ef46f9f00b19513fc3cec4c.tar.bz2
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 41096ef..24f3578 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();
+}