MantisBT - CMake
View Issue Details
0006285CMakeCMakepublic2008-01-29 09:292016-06-10 14:30
Brad King 
Brad King 
normalminoralways
closedmoved 
 
 
0006285: File-level versus target-level dependencies for custom commands
Consider a chain of custom commands:

  in.txt -> out1.txt -> out2.txt

Assume they are placed in targets

  add_custom_target(custom1 DEPENDS out1.txt)
  add_custom_target(custom2 DEPENDS out2.txt)

The rule for out1.txt will be pulled into custom2 via out2.txt's dependency on it. In a parallel build the rule for out1.txt might be run twice simultaneously.

In order to avoid this, one must write

  add_dependencies(custom2 custom1)

However we should be able to compute and add this dependency automatically.
No tags attached.
Issue History
2008-01-29 09:29Brad KingNew Issue
2008-01-29 09:31Brad KingNote Added: 0010326
2008-02-15 10:41Bill HoffmanStatusnew => assigned
2008-02-15 10:41Bill HoffmanAssigned To => Brad King
2012-08-13 10:37Brad KingStatusassigned => backlog
2012-08-13 10:37Brad KingNote Added: 0030544
2016-06-10 14:27Kitware RobotNote Added: 0041407
2016-06-10 14:27Kitware RobotStatusbacklog => resolved
2016-06-10 14:27Kitware RobotResolutionopen => moved
2016-06-10 14:30Kitware RobotStatusresolved => closed

Notes
(0010326)
Brad King   
2008-01-29 09:31   
We should be able to keep some kind of table to know that out1.txt has been explicitly listed in target custom1. When tracing the depenencies in target custom2 for out2.txt it should recognize that in order to get out1.txt it should add the target-level dependency on custom1 instead of pulling in the rule.
(0030544)
Brad King   
2012-08-13 10:37   
Sending issues I'm not actively working on to the backlog to await someone with time for them.

If an issue you care about is sent to the backlog when you feel it should have been addressed in a different manner, please bring it up on the CMake mailing list for discussion. Sign up for the mailing list here, if you're not already on it:

 http://www.cmake.org/mailman/listinfo/cmake [^]

It's easy to re-activate a bug here if you can find a CMake developer or contributor who has the bandwidth to take it on.
(0041407)
Kitware Robot   
2016-06-10 14:27   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.