diff options
author | Johnny Jazeix <jazeix@gmail.com> | 2019-12-26 16:39:36 (GMT) |
---|---|---|
committer | Johnny Jazeix <jazeix@gmail.com> | 2019-12-26 16:39:36 (GMT) |
commit | a024d614ca60080e71cdca6c56fed44f9a9e64a3 (patch) | |
tree | d3b59c97824e5f6c632b1501407ba1f79968909a /Source | |
parent | 419fd17aa99576cf75ea083eef2e93b80688c37b (diff) | |
download | CMake-a024d614ca60080e71cdca6c56fed44f9a9e64a3.zip CMake-a024d614ca60080e71cdca6c56fed44f9a9e64a3.tar.gz CMake-a024d614ca60080e71cdca6c56fed44f9a9e64a3.tar.bz2 |
cmCoreTryCompile::CleanupFiles now removes symlinks instead of their contents.
Fixes: #17522
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 { |