summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2021-05-04 20:31:05 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2021-06-04 12:52:01 (GMT)
commitf73027b182710dd00524b2a4007838f9080c3ea1 (patch)
treec04269f51de0462f7da371ed0a2d4241ec3e4a47 /Source/cmSystemTools.cxx
parent966f7250df01df7982aa6ff4117464d797b6bf10 (diff)
downloadCMake-f73027b182710dd00524b2a4007838f9080c3ea1.zip
CMake-f73027b182710dd00524b2a4007838f9080c3ea1.tar.gz
CMake-f73027b182710dd00524b2a4007838f9080c3ea1.tar.bz2
cmSystemTools: Add SetRPath() method
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx32
1 files changed, 32 insertions, 0 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index b45228e..10d2e50 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -2744,6 +2744,24 @@ bool cmSystemTools::ChangeRPath(std::string const& file,
return AdjustRPath(file, MakeEmptyCallback(newRPath), adjustCallback, emsg,
changed);
}
+
+bool cmSystemTools::SetRPath(std::string const& file,
+ std::string const& newRPath, std::string* emsg,
+ bool* changed)
+{
+ auto adjustCallback = [newRPath](cm::optional<std::string>& outRPath,
+ const std::string& inRPath,
+ const char* /*se_name*/, std::string *
+ /*emsg*/) -> bool {
+ if (inRPath != newRPath) {
+ outRPath = newRPath;
+ }
+ return true;
+ };
+
+ return AdjustRPath(file, MakeEmptyCallback(newRPath), adjustCallback, emsg,
+ changed);
+}
#elif defined(CMake_USE_XCOFF_PARSER)
bool cmSystemTools::ChangeRPath(std::string const& file,
std::string const& oldRPath,
@@ -2813,6 +2831,13 @@ bool cmSystemTools::ChangeRPath(std::string const& file,
}
return true;
}
+
+bool cmSystemTools::SetRPath(std::string const& /*file*/,
+ std::string const& /*newRPath*/,
+ std::string* /*emsg*/, bool* /*changed*/)
+{
+ return false;
+}
#else
bool cmSystemTools::ChangeRPath(std::string const& /*file*/,
std::string const& /*oldRPath*/,
@@ -2822,6 +2847,13 @@ bool cmSystemTools::ChangeRPath(std::string const& /*file*/,
{
return false;
}
+
+bool cmSystemTools::SetRPath(std::string const& /*file*/,
+ std::string const& /*newRPath*/,
+ std::string* /*emsg*/, bool* /*changed*/)
+{
+ return false;
+}
#endif
bool cmSystemTools::VersionCompare(cmSystemTools::CompareOp op,