MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0010082 | CMake | CMake | public | 2009-12-26 04:46 | 2016-06-10 14:31 |
Reporter | Joerg Faschingbauer | ||||
Assigned To | Brad King | ||||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | moved | ||
Platform | OS | OS Version | |||
Product Version | CMake-2-8 | ||||
Target Version | Fixed in Version | ||||
Summary | 0010082: ADD_CUSTOM_COMMAND and ADD_CUSTOM_TARGET: parallel make executes command multiple times | ||||
Description | Custom targets are obviously processed using sub-make invocations. This leads to multiple builds of their dependencies when doing a parallel build. The following example is a bit contrived - it's the minimum reproducer I can come up with. In real life I use multiple generator steps which are cascaded on top of each other, with the output of each step hooked into the 'all' target using ADD_CUSTOM_TARGET(name ALL ...). Using the 'Unix Makefiles' generator and make -j2, you'll see that the file 'generated' is generated twice ('custom command running' is printed twice). PROJECT(test) CMAKE_MINIMUM_REQUIRED(VERSION 2.6) ADD_CUSTOM_COMMAND( OUTPUT generated COMMAND sleep 1 COMMAND echo custom command running COMMAND touch generated ) ADD_CUSTOM_TARGET( my-all-1 ALL DEPENDS generated ) ADD_CUSTOM_TARGET( my-all-2 ALL DEPENDS generated ) | ||||
Steps To Reproduce | |||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2009-12-26 04:46 | Joerg Faschingbauer | New Issue | |||
2009-12-26 11:38 | Bill Hoffman | Status | new => assigned | ||
2009-12-26 11:38 | Bill Hoffman | Assigned To | => Bill Hoffman | ||
2009-12-26 11:39 | Bill Hoffman | Note Added: 0018995 | |||
2009-12-29 05:18 | Joerg Faschingbauer | Note Added: 0019006 | |||
2010-01-26 06:37 | Joerg Faschingbauer | Note Added: 0019306 | |||
2010-01-26 09:03 | Bill Hoffman | Assigned To | Bill Hoffman => Brad King | ||
2010-01-26 09:17 | Brad King | Note Added: 0019311 | |||
2011-06-12 13:52 | Andreas Mohr | Note Added: 0026844 | |||
2012-08-13 10:44 | Brad King | Status | assigned => backlog | ||
2012-08-13 10:44 | Brad King | Note Added: 0030552 | |||
2016-06-10 14:27 | Kitware Robot | Note Added: 0041636 | |||
2016-06-10 14:27 | Kitware Robot | Status | backlog => resolved | ||
2016-06-10 14:27 | Kitware Robot | Resolution | open => moved | ||
2016-06-10 14:31 | Kitware Robot | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|