summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-06-19 12:13:19 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-06-19 12:14:05 (GMT)
commitc0b44e664b94953b2c9ee476ee8609eaa6c0d1c7 (patch)
tree2bbc954fcac55d4c188a5c311b6520e941f0cc1e
parent21d0961bc222dcdfac194354203e144e305959ea (diff)
parenta9a258c3027b02121e989e98ab134f9f518938d2 (diff)
downloadCMake-c0b44e664b94953b2c9ee476ee8609eaa6c0d1c7.zip
CMake-c0b44e664b94953b2c9ee476ee8609eaa6c0d1c7.tar.gz
CMake-c0b44e664b94953b2c9ee476ee8609eaa6c0d1c7.tar.bz2
Merge topic 'try_compile-nfs' into release-3.18
a9a258c302 try_compile: Do not try to remove '.nfs*' files Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Robert Maynard <robert.maynard@kitware.com> Acked-by: Axel Huebl <axel.huebl@plasma.ninja> Merge-request: !4913
-rw-r--r--Source/cmCoreTryCompile.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx
index a7acadc..8550d04 100644
--- a/Source/cmCoreTryCompile.cxx
+++ b/Source/cmCoreTryCompile.cxx
@@ -1050,7 +1050,9 @@ void cmCoreTryCompile::CleanupFiles(std::string const& binDir)
std::set<std::string> deletedFiles;
for (unsigned long i = 0; i < dir.GetNumberOfFiles(); ++i) {
const char* fileName = dir.GetFile(i);
- if (strcmp(fileName, ".") != 0 && strcmp(fileName, "..") != 0) {
+ if (strcmp(fileName, ".") != 0 && strcmp(fileName, "..") != 0 &&
+ // Do not delete NFS temporary files.
+ !cmHasPrefix(fileName, ".nfs")) {
if (deletedFiles.insert(fileName).second) {
std::string const fullPath =
std::string(binDir).append("/").append(fileName);