[cmake-developers] [CMake 0013639]: Parellel builds of targets in the same CMakeLists.txt sometimes fail

Mantis Bug Tracker mantis at public.kitware.com
Thu Nov 1 16:52:16 EDT 2012


The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=13639 
====================================================================== 
Reported By:                Todd Greer
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   13639
Category:                   CMake
Reproducibility:            random
Severity:                   major
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2012-11-01 15:52 CDT
Last Modified:              2012-11-01 15:52 CDT
====================================================================== 
Summary:                    Parellel builds of targets in the same
CMakeLists.txt sometimes fail
Description: 
I have several libraries in my build that are all declared in the same
CMakeLists.txt (by add_library).

Unfortunately, the Visual Studio generator (2010, but I don't think it matters)
puts "CMakeFiles\generate.stamp" in the output directory for that
CMakeLists.txt. When being build in parallel, these targets sometimes seem to
collide, yielding an error like this:

CUSTOMBUILD : CMake error : Cannot restore timestamp
<outdir>\CMakeFiles\generate.stamp

AFAICT, there is no documented prohibition on pointing multiple projects'
outputs to the same directory. Either this should be fixed, or the restriction
should be documented.

Steps to Reproduce: 
Create a CMakeLists.txt with multiple add_library commands. Build with VS2010,
with parallel building enabled, on a multicore computer. Observe the failure
listed in the description.

Additional Information: 
There would be some work involved in cutting our build config down to something
I could submit; please let me know if that is required.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2012-11-01 15:52 Todd Greer     New Issue                                    
======================================================================




More information about the cmake-developers mailing list