MCPcopy Create free account
hub / github.com/Kitware/CMake / GetRPathString

Method GetRPathString

Source/cmComputeLinkInformation.cxx:2338–2364  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2336}
2337
2338std::string cmComputeLinkInformation::GetRPathString(bool for_install) const
2339{
2340 // Get the directories to use.
2341 std::vector<std::string> runtimeDirs;
2342 this->GetRPath(runtimeDirs, for_install);
2343
2344 // Concatenate the paths.
2345 std::string rpath = cmJoin(runtimeDirs, this->GetRuntimeSep());
2346
2347 // If the rpath will be replaced at install time, prepare space.
2348 if (!for_install && this->RuntimeUseChrpath) {
2349 if (!rpath.empty()) {
2350 // Add one trailing separator so the linker does not reuse the
2351 // rpath .dynstr entry for a symbol name that happens to match
2352 // the end of the rpath string.
2353 rpath += this->GetRuntimeSep();
2354 }
2355
2356 // Make sure it is long enough to hold the replacement value.
2357 std::string::size_type minLength = this->GetChrpathString().length();
2358 while (rpath.length() < minLength) {
2359 rpath += this->GetRuntimeSep();
2360 }
2361 }
2362
2363 return rpath;
2364}
2365
2366std::string cmComputeLinkInformation::GetChrpathString() const
2367{

Callers 3

GetChrpathStringMethod · 0.95
ComputeRPathMethod · 0.80
AddChrpathPatchRuleMethod · 0.80

Calls 5

GetRPathMethod · 0.95
GetChrpathStringMethod · 0.95
lengthMethod · 0.80
cmJoinFunction · 0.70
emptyMethod · 0.45

Tested by

no test coverage detected