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

Method ChangeRPath

Source/cmSystemTools.cxx:3713–3736  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3711}
3712
3713bool cmSystemTools::ChangeRPath(std::string const& file,
3714 std::string const& oldRPath,
3715 std::string const& newRPath,
3716 bool removeEnvironmentRPath, std::string* emsg,
3717 bool* changed)
3718{
3719 if (cm::optional<bool> result = ChangeRPathELF(
3720 file, oldRPath, newRPath, removeEnvironmentRPath, emsg, changed)) {
3721 return result.value();
3722 }
3723 if (cm::optional<bool> result = ChangeRPathXCOFF(
3724 file, oldRPath, newRPath, removeEnvironmentRPath, emsg, changed)) {
3725 return result.value();
3726 }
3727 // The file format is not recognized. Assume it has no RPATH.
3728 if (newRPath.empty()) {
3729 // The caller wanted no RPATH anyway.
3730 return true;
3731 }
3732 if (emsg) {
3733 *emsg = "The file format is not recognized.";
3734 }
3735 return false;
3736}
3737
3738bool cmSystemTools::SetRPath(std::string const& file,
3739 std::string const& newRPath, std::string* emsg,

Callers

nothing calls this directly

Calls 4

ChangeRPathELFFunction · 0.85
ChangeRPathXCOFFFunction · 0.85
valueMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected