The following issue has been SUBMITTED. ====================================================================== http://cmake.org/Bug/view.php?id=12564 ====================================================================== Reported By: Andras Lasso Assigned To: ====================================================================== Project: CMake Issue ID: 12564 Category: CMake Reproducibility: always Severity: major Priority: normal Status: new ====================================================================== Date Submitted: 2011-11-08 12:19 EST Last Modified: 2011-11-08 12:19 EST ====================================================================== Summary: Repeated git clones and build for external projects on Windows Description: It's extremely frustrating to use git external projects on Windows, mainly due to two problems.
1. CMake&git keeps downloading and building the project many times. This takes very long time on projects using VTK, ITK, Slicer, CTK, etc. 2. Many directory deletes that seems to occur during simple update/rebuild operations. If they fail to complete (because the directory is in use) then it leads to permanent git errors. msysgit: 1.7.7.msysgit.1 TortoiseGit: 1.7.3.0 Steps to Reproduce: 1. Typical use case for re-clone and re-build problem: -Start build in debug mode => git clone, re-build -Start build in release mode => git clone(!), re-build -Start build in debug mode => re-build(!) This means that when building a project in two modes it does an extra clone and build step, which takes 2-3 hours on a larger project. 2. Typical use case for directory delete problem: -Start build in debug mode -Run the application in debug mode, keep the subproject binary directory (c:\devel\cmakegittest\cmakegittest-superbuild-bin4\cmakegittest-bin) as the current directory in the command-line window -Start build in release mode => build fails due to "C:/devel/cmakegittest/cmakegittest-superbuild-bin4/cmakegittest" directory cannot be deleted - note that this is not the directory that was kept in the current command-line window 1>------ Build started: Project: cmakegittest, Configuration: Release Win32 ------ 1>Performing download step (git clone) for 'cmakegittest' 1>Error removing directory "C:/devel/cmakegittest/cmakegittest-superbuild-bin4/cmakegittest". 1>CMake Error at cmakegittest-prefix/tmp/cmakegittest-gitclone.cmake:10 (message): 1> Failed to remove directory: 1> 'C:/devel/cmakegittest/cmakegittest-superbuild-bin4/cmakegittest' 1>Project : error PRJ0019: A tool returned an error code from "Performing download step (git clone) for 'cmakegittest'" 1>Build log was saved at "file://c:\devel\cmakegittest\cmakegittest-superbuild-bin4\cmakegittest.dir\Release\BuildLog.htm" 1>cmakegittest - 1 error(s), 0 warning(s) 2>------ Skipped Build: Project: ALL_BUILD, Configuration: Release Win32 ------ 2>Project not selected to build for this solution configuration ========== Build: 0 succeeded, 1 failed, 1 up-to-date, 1 skipped ========== All repeated build attempts fail. The c:\devel\cmakegittest\cmakegittest-superbuild-bin4\cmakegittest cannot be opened in explorer. Killing the TGitCache.exe process solves the problem: the c:\devel\cmakegittest\cmakegittest-superbuild-bin4\cmakegittest directory disappears and repeated build attempts succeed. Additional Information: Attached a sample CMakeLists.txt with that the above reported problems can be easily reproduced (it downloads and builds a small sub-project from github). ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2011-11-08 12:19 Andras Lasso New Issue 2011-11-08 12:19 Andras Lasso File Added: CMakeLists.txt ====================================================================== -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers