[Cmake-commits] [cmake-commits] hoffman committed cmCoreTryCompile.cxx 1.8 1.9

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Mar 26 13:14:19 EDT 2008


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv19837

Modified Files:
	cmCoreTryCompile.cxx 
Log Message:
ENH: try to fix dashboard issue with not being able to remove try compile code


Index: cmCoreTryCompile.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmCoreTryCompile.cxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -C 2 -d -r1.8 -r1.9
*** cmCoreTryCompile.cxx	19 Mar 2008 19:44:56 -0000	1.8
--- cmCoreTryCompile.cxx	26 Mar 2008 17:14:16 -0000	1.9
***************
*** 360,366 ****
            if(!cmSystemTools::RemoveFile(fullPath.c_str()))
              {
!             std::string m = "Remove failed on file: ";
!             m += fullPath;
!             cmSystemTools::ReportLastSystemError(m.c_str());
              }
            }
--- 360,382 ----
            if(!cmSystemTools::RemoveFile(fullPath.c_str()))
              {
!             bool removed = false;
!             int numAttempts = 0;
!             // sometimes anti-virus software hangs on to
!             // new files and we can not delete them, so try
!             // 5 times with .5 second delay between tries.
!             while(!removed && numAttempts < 5)
!               {
!               cmSystemTools::Delay(500);
!               if(cmSystemTools::RemoveFile(fullPath.c_str()))
!                 {
!                 removed = true;
!                 }
!               }
!             if(!removed)
!               {
!               std::string m = "Remove failed on file: ";
!               m += fullPath;
!               cmSystemTools::ReportLastSystemError(m.c_str());
!               }
              }
            }



More information about the Cmake-commits mailing list