| 3531 | } |
| 3532 | |
| 3533 | std::function<bool(std::string*, cmELF const&)> MakeEmptyCallback( |
| 3534 | std::string const& newRPath) |
| 3535 | { |
| 3536 | return [newRPath](std::string* emsg, cmELF const& elf) -> bool { |
| 3537 | if (newRPath.empty()) { |
| 3538 | // The new rpath is empty and there is no rpath anyway so it is |
| 3539 | // okay. |
| 3540 | return true; |
| 3541 | } |
| 3542 | if (emsg) { |
| 3543 | *emsg = |
| 3544 | cmStrCat("No valid ELF RPATH or RUNPATH entry exists in the file; ", |
| 3545 | elf.GetErrorMessage()); |
| 3546 | } |
| 3547 | return false; |
| 3548 | }; |
| 3549 | } |
| 3550 | } |
| 3551 | |
| 3552 | static cm::optional<bool> ChangeRPathELF(std::string const& file, |
no test coverage detected
searching dependent graphs…