cmSystemTools: Silence CreateLink and CreateSymlink errors

If provided, report errors to a std::string.
This allows "silent" fallback to another flow, like COPY_ON_ERROR.
This commit is contained in:
Tushar Maheshwari
2019-01-15 20:34:46 +05:30
committed by Brad King
parent 593d986470
commit 0f08ed8936
3 changed files with 31 additions and 21 deletions
+4 -2
View File
@@ -528,12 +528,14 @@ public:
/** Create a symbolic link if the platform supports it. Returns whether
creation succeeded. */
static bool CreateSymlink(const std::string& origName,
const std::string& newName);
const std::string& newName,
std::string* errorMessage = nullptr);
/** Create a hard link if the platform supports it. Returns whether
creation succeeded. */
static bool CreateLink(const std::string& origName,
const std::string& newName);
const std::string& newName,
std::string* errorMessage = nullptr);
private:
static bool s_ForceUnixPaths;