diff options
author | Tushar Maheshwari <tushar27192@gmail.com> | 2019-01-15 15:04:46 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-01-16 15:03:35 (GMT) |
commit | 0f08ed89362d207e18b06e806f127cd683b79141 (patch) | |
tree | 890884ead135d0000f4cce22b5970d178ffd5411 /Source/cmSystemTools.h | |
parent | 593d986470ce1938436da312e0c93e3c9c07017e (diff) | |
download | CMake-0f08ed89362d207e18b06e806f127cd683b79141.zip CMake-0f08ed89362d207e18b06e806f127cd683b79141.tar.gz CMake-0f08ed89362d207e18b06e806f127cd683b79141.tar.bz2 |
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.
Diffstat (limited to 'Source/cmSystemTools.h')
-rw-r--r-- | Source/cmSystemTools.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h index 15f27e5..489811d 100644 --- a/Source/cmSystemTools.h +++ b/Source/cmSystemTools.h @@ -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; |