diff options
author | Stephen Kelly <steveire@gmail.com> | 2016-10-08 10:21:39 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2016-10-10 18:38:59 (GMT) |
commit | 4134030434ea88024ef46f9f00b19513fc3cec4c (patch) | |
tree | 2eab60a4a8704dff0b8cdec8dfc8ccd4fd3288b8 /Source/cmLinkLineComputer.cxx | |
parent | f03d446e967af91460ff31eb52d840983b3d8cec (diff) | |
download | CMake-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.cxx | 25 |
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(); +} |