MantisBT - CMake
View Issue Details
0015479CMakeCMakepublic2015-03-26 16:052016-06-10 14:31
Ben Boeckel 
Kitware Robot 
normalfeaturehave not tried
closedmoved 
 
 
0015479: Support depfiles from add_custom_command
It would be nice to be able to have custom commands be able to generate their own depfiles for Make and Ninja. Probably a DEPFILE argument to `add_custom_command`.
No tags attached.
related to 0013234closed Peter Collingbourne Ninja: Add support for IMPLICIT_DEPENDS in add_custom_command 
Issue History
2015-03-26 16:05Ben BoeckelNew Issue
2015-03-26 16:24Brad KingNote Added: 0038338
2015-03-26 16:28Ben BoeckelNote Added: 0038339
2015-12-04 09:22Marco ClemencicNote Added: 0039952
2015-12-04 09:30Brad KingRelationship addedrelated to 0013234
2016-06-10 14:29Kitware RobotNote Added: 0042745
2016-06-10 14:29Kitware RobotStatusnew => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0038338)
Brad King   
2015-03-26 16:24   
Interesting. This would do for Ninja what the IMPLICIT_DEPENDS option does for Makefile generators.

Since the behavior is specific to Ninja perhaps it should be called NINJA_DEPFILE.
(0038339)
Ben Boeckel   
2015-03-26 16:28   
Here is a command which would benefit from this: https://gitlab.kitware.com/vtk/vtk/merge_requests/56 [^]

Ah, if it would be Ninja-specific, then yes. May as well support NINJA_DEPFORMAT if someone wants to write MSVC-style dependency info as well for some reason (or someone had another format coded up *whistles*).
(0039952)
Marco Clemencic   
2015-12-04 09:22   
Hi,

I found this feature request while looking for Ninja + IMPLICIT_DEPENDS.

I have projects with code generation steps, in some cases from C/C++ files (for which I can use IMPLICIT_DEPENDS), in others from XML (for which there is no way to generate dependencies at build time).

The kind of feature requested here would help me a lot, but it should not be restricted to one generator, rather it should use a generic format that all generators can convert to their specific formats.

I use CMake because it's portable I a would prefer not to write configuration files with switches that depend on the generator used (already the fact that IMPLICIT_DEPENDS only work for Makefile is very annoying).

Cheers
Marco
(0042745)
Kitware Robot   
2016-06-10 14:29   
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.