MantisBT - CMake
View Issue Details
0013639CMakeCMakepublic2012-11-01 16:522013-12-02 08:51
Todd Greer 
Brad King 
normalmajorrandom
closedfixed 
Visual Studio 2010WindowsWindows 7
CMake 2.8.7 
CMake 2.8.11CMake 2.8.11 
0013639: Parellel builds of targets in the same CMakeLists.txt sometimes fail
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.
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.
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.
No tags attached.
Issue History
2012-11-01 16:52Todd GreerNew Issue
2013-07-25 16:14Brad KingNote Added: 0033616
2013-07-25 16:14Brad KingAssigned To => Brad King
2013-07-25 16:14Brad KingStatusnew => resolved
2013-07-25 16:14Brad KingResolutionopen => fixed
2013-07-25 16:14Brad KingFixed in Version => CMake 2.8.11
2013-07-25 16:14Brad KingTarget Version => CMake 2.8.11
2013-12-02 08:51Robert MaynardNote Added: 0034659
2013-12-02 08:51Robert MaynardStatusresolved => closed

Notes
(0033616)
Brad King   
2013-07-25 16:14   
This was fixed in CMake 2.8.11 by these commits:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2dc17f88 [^]
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=59b568e5 [^]
(0034659)
Robert Maynard   
2013-12-02 08:51   
Closing resolved issues that have not been updated in more than 4 months.