summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-03-30 12:57:04 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-03-30 12:57:07 (GMT)
commit2f359787f6a5d6da20621fb1a161c8cac49902bc (patch)
tree3e7765fc6d77e819c1183fc079d3eaeea1eedb88 /Source
parent7a6ab42f4712adf788156f127aacdad3e1c49cab (diff)
parent8e8f1118b947905e0e881ea3d9cc881f5fdce89d (diff)
downloadCMake-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.cxx3
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;