View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013160CMakeCMakepublic2012-04-23 03:282013-01-09 10:55
ReporterAndreas Roth 
Assigned ToBrad King 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformWindowsOSWindows 7OS Version6.1.7601
Product VersionCMake 2.8.8 
Target VersionCMake 2.8.9Fixed in VersionCMake 2.8.9 
Summary0013160: try_compile leaves temporary directories
DescriptionI installed the version 2.8.8 of CMake and i noticed that each try_compile run leaves a directory like build\CMakeFiles\CMakeTmp\cmTryCompileExec78340897.dir.

This behavior has been introduced to fix the issue described here:
http://public.kitware.com/Bug/view.php?id=12957 [^]

On a build machine i noticed that each CMake run gets slower and slower. After deleting all directories in build\CMakeFiles\CMakeTmp the speed got back to normal. I used the process monitor (from sysinternals) and saw that CMake enumerates all items in the build\CMakeFiles\CMakeTmp quite often. I don't know why, but i think that's the reason for the decreasing speed.
Steps To Reproduce1. delete the CMakeCache.txt file if it exists
2. Run cmake -G "Visual Studio 9 2008" .
   with CMakeLists.txt:
   PROJECT(HelloWorld C CXX)
   this detects the compiler and leaves several directories in CMakeFiles\CMakeTmp.
3. goto step 1
TagsNo tags attached.
Attached Files

 Relationships
related to 0012957closedBrad King Compiler tests randomly fail on Win7 
has duplicate 0013407closed Does not remove empty "cmTryCompileExec*.dir" directories 

  Notes
(0029311)
Brad King (manager)
2012-04-23 10:18

Please try this patch (untested):
diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx
index 48f644b..ed485e3 100644
--- a/Source/cmCoreTryCompile.cxx
+++ b/Source/cmCoreTryCompile.cxx
@@ -404,6 +404,7 @@ void cmCoreTryCompile::CleanupFiles(const char* binDir)
         if(cmSystemTools::FileIsDirectory(fullPath.c_str()))
           {
           this->CleanupFiles(fullPath.c_str());
+          cmSystemTools::RemoveADirectory(fullPath.c_str());
           }
         else
           {
(0029346)
Andreas Roth (reporter)
2012-04-26 05:52

I just tried yours patch and it works fine. Thx
(0029349)
Brad King (manager)
2012-04-26 08:50

Thanks for testing. Applied:

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=953257ca [^]
(0032027)
Robert Maynard (manager)
2013-01-09 10:55

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2012-04-23 03:28 Andreas Roth New Issue
2012-04-23 10:18 Brad King Note Added: 0029311
2012-04-23 10:18 Brad King Relationship added related to 0012957
2012-04-26 05:52 Andreas Roth Note Added: 0029346
2012-04-26 08:50 Brad King Note Added: 0029349
2012-04-26 08:50 Brad King Status new => resolved
2012-04-26 08:50 Brad King Fixed in Version => CMake 2.8.9
2012-04-26 08:50 Brad King Resolution open => fixed
2012-04-26 08:50 Brad King Assigned To => Brad King
2012-07-17 13:07 Brad King Relationship added has duplicate 0013407
2012-08-09 19:32 David Cole Target Version => CMake 2.8.9
2013-01-09 10:55 Robert Maynard Note Added: 0032027
2013-01-09 10:55 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team