cmSystemTools: Provide quiet link creation methods

Offer variants that let the caller handle error messages.
This commit is contained in:
Brad King
2022-10-06 13:44:27 -04:00
parent 2133cf2c8e
commit aba48bd6ac
4 changed files with 50 additions and 30 deletions

View File

@@ -595,14 +595,16 @@ public:
/** Create a symbolic link if the platform supports it. Returns whether
creation succeeded. */
static cmsys::Status CreateSymlink(std::string const& origName,
std::string const& newName,
std::string* errorMessage = nullptr);
std::string const& newName);
static cmsys::Status CreateSymlinkQuietly(std::string const& origName,
std::string const& newName);
/** Create a hard link if the platform supports it. Returns whether
creation succeeded. */
static cmsys::Status CreateLink(std::string const& origName,
std::string const& newName,
std::string* errorMessage = nullptr);
std::string const& newName);
static cmsys::Status CreateLinkQuietly(std::string const& origName,
std::string const& newName);
/** Get the system name. */
static cm::string_view GetSystemName();