diff options
author | Brad King <brad.king@kitware.com> | 2017-03-30 12:57:04 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-03-30 12:57:07 (GMT) |
commit | 2f359787f6a5d6da20621fb1a161c8cac49902bc (patch) | |
tree | 3e7765fc6d77e819c1183fc079d3eaeea1eedb88 /Source | |
parent | 7a6ab42f4712adf788156f127aacdad3e1c49cab (diff) | |
parent | 8e8f1118b947905e0e881ea3d9cc881f5fdce89d (diff) | |
download | CMake-2f359787f6a5d6da20621fb1a161c8cac49902bc.zip CMake-2f359787f6a5d6da20621fb1a161c8cac49902bc.tar.gz CMake-2f359787f6a5d6da20621fb1a161c8cac49902bc.tar.bz2 |
Merge topic 'cmake-file-install-symlink-on-nonexistng-path'
8e8f1118 handle non-existing symlink creation locations
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !642
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmFileCommand.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 97292f9..7207d34 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -1486,6 +1486,9 @@ bool cmFileCopier::InstallSymlink(const char* fromFile, const char* toFile) // Remove the destination file so we can always create the symlink. cmSystemTools::RemoveFile(toFile); + // Create destination directory if it doesn't exist + cmSystemTools::MakeDirectory(cmSystemTools::GetFilenamePath(toFile)); + // Create the symlink. if (!cmSystemTools::CreateSymlink(symlinkTarget, toFile)) { std::ostringstream e; |