mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
cmake: Add '-E create_symlink' support on Windows
The allows `-E create_symlink` to work on Windows. It utilizes `uv_fs_symlink`. I am still unsure exactly which Windows platforms will work without requiring Administrator privileges or needing a user/group with the "Create Symbolic Links" User Rights. It does work with my Windows 10 Pro with Developer Mode turned on. In the test suite check that the symlink either worked or failed with a permissions error. Use recent changes in cmSystemTools::FileExists to check that a symlink is broken.
This commit is contained in:
committed by
Brad King
parent
49cb2a504d
commit
afb7f6e4ff
@@ -513,6 +513,11 @@ public:
|
||||
/** Perform one-time initialization of libuv. */
|
||||
static void InitializeLibUV();
|
||||
|
||||
/** Create a symbolic link if the platform supports it. Returns whether
|
||||
creation succeeded. */
|
||||
static bool CreateSymlink(const std::string& origName,
|
||||
const std::string& newName);
|
||||
|
||||
private:
|
||||
static bool s_ForceUnixPaths;
|
||||
static bool s_RunCommandHideConsole;
|
||||
|
||||
Reference in New Issue
Block a user