diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2019-12-27 15:52:28 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-12-27 15:52:36 (GMT) |
commit | e8776d6e3ad2575d647d4b53dab65100c05a547e (patch) | |
tree | 0728892edeba50ae71a334101298ed296b600a95 /Source | |
parent | c63bf5a3e557e79a8bc39627e952ed5720623c1f (diff) | |
parent | a024d614ca60080e71cdca6c56fed44f9a9e64a3 (diff) | |
download | CMake-e8776d6e3ad2575d647d4b53dab65100c05a547e.zip CMake-e8776d6e3ad2575d647d4b53dab65100c05a547e.tar.gz CMake-e8776d6e3ad2575d647d4b53dab65100c05a547e.tar.bz2 |
Merge topic 'cmcoretrycompile_cleanup_symlinks'
a024d614ca cmCoreTryCompile::CleanupFiles now removes symlinks instead of their contents.
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4158
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmCoreTryCompile.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx index 4715cfa..da04396 100644 --- a/Source/cmCoreTryCompile.cxx +++ b/Source/cmCoreTryCompile.cxx @@ -1045,7 +1045,9 @@ void cmCoreTryCompile::CleanupFiles(std::string const& binDir) if (deletedFiles.insert(fileName).second) { std::string const fullPath = std::string(binDir).append("/").append(fileName); - if (cmSystemTools::FileIsDirectory(fullPath)) { + if (cmSystemTools::FileIsSymlink(fullPath)) { + cmSystemTools::RemoveFile(fullPath); + } else if (cmSystemTools::FileIsDirectory(fullPath)) { this->CleanupFiles(fullPath); cmSystemTools::RemoveADirectory(fullPath); } else { |