[cmake-developers] [CMake 0011503]: cmake fails to remove non existent file
Mantis Bug Tracker
mantis at public.kitware.com
Wed Nov 24 07:56:12 EST 2010
The following issue has been SUBMITTED.
======================================================================
http://www.cmake.org/Bug/view.php?id=11503
======================================================================
Reported By: blaudden
Assigned To:
======================================================================
Project: CMake
Issue ID: 11503
Category: (No Category)
Reproducibility: random
Severity: major
Priority: normal
Status: new
======================================================================
Date Submitted: 2010-11-24 07:56 EST
Last Modified: 2010-11-24 07:56 EST
======================================================================
Summary: cmake fails to remove non existent file
Description:
cmake spuriously fails to remove files which it has produced during "try
compile" with error "No such file or directory". Since the file does not exist
anymore, I think this should be reported as a success to remove the file.
Steps to Reproduce:
cmake -G "Visual Studio 9 2008 Win64"
-- Check for working C compiler: cl
-- Check for working C compiler: cl -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: cl
-- Check for working CXX compiler: cl -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detected 64-bit platform.
<snip>
-- Looking for sys/types.h
CMake Error: Remove failed on file:
C:/club/bzr_mysql-5.1-telco-7.0/1019/mysql-5.1.51-ndb-7.0.21-pb1019/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec.exe:
System Error: No such file or directory
Additional Information:
Looking in Source/cmCoreTryCompile.cc I see a retry loop which retries the
RemoveFile() 5 time with half a second delay. Would suggest that the loop is
extended to also check if file still exists.
Maybe something like below?
cmake-2.8.3$ diff -u Source/cmCoreTryCompile.cxx
Source/cmCoreTryCompile.cxx.orig
--- Source/cmCoreTryCompile.cxx 2010-11-24 09:55:33.000000000 +0100
+++ Source/cmCoreTryCompile.cxx.orig 2010-11-24 09:54:38.000000000 +0100
@@ -408,7 +408,7 @@
cmSystemTools::Delay(500);
if(cmSystemTools::RemoveFile(fullPath.c_str()))
{
- removed = FileExists(fullPath.c_str());
+ removed = true;
}
numAttempts++;
}
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2010-11-24 07:56 blaudden New Issue
======================================================================
More information about the cmake-developers
mailing list