summaryrefslogtreecommitdiffstats
path: root/Source/cmFileCommand.h
diff options
context:
space:
mode:
authorTushar Maheshwari <tushar27192@gmail.com>2018-12-27 11:58:30 (GMT)
committerBrad King <brad.king@kitware.com>2019-01-16 15:03:35 (GMT)
commit81650e488c734702384ef903630838015a3f81b1 (patch)
tree7391c238c012b6e34ed73130d588bf80a404122e /Source/cmFileCommand.h
parentc59eae7ebc5423c2b06befd762f8639b0f23b7a0 (diff)
downloadCMake-81650e488c734702384ef903630838015a3f81b1.zip
CMake-81650e488c734702384ef903630838015a3f81b1.tar.gz
CMake-81650e488c734702384ef903630838015a3f81b1.tar.bz2
cmFileCommand: Add CREATE_LINK subcommand
This brings the functionality of `cmake -E create_symlink` and more to scripts. The default behavior is to create hard links. The `SYMBOLIC` argument can be used to create symlinks instead. The `COPY_ON_ERROR` argument enables a fallback to copying the file in case the link fails. The `RESULT <var>` retrieves the error message generated by the system. It is set to "0" on success. Fixes: #16926
Diffstat (limited to 'Source/cmFileCommand.h')
-rw-r--r--Source/cmFileCommand.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Source/cmFileCommand.h b/Source/cmFileCommand.h
index fe05c98..12c5115 100644
--- a/Source/cmFileCommand.h
+++ b/Source/cmFileCommand.h
@@ -61,6 +61,7 @@ protected:
bool HandleLockCommand(std::vector<std::string> const& args);
bool HandleSizeCommand(std::vector<std::string> const& args);
bool HandleReadSymlinkCommand(std::vector<std::string> const& args);
+ bool HandleCreateLinkCommand(std::vector<std::string> const& args);
private:
void AddEvaluationFile(const std::string& inputName,