| 2336 | } |
| 2337 | |
| 2338 | std::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 | |
| 2366 | std::string cmComputeLinkInformation::GetChrpathString() const |
| 2367 | { |
no test coverage detected