MantisBT - CMake
View Issue Details
0014425CMakeDocumentationpublic2013-09-19 13:262016-06-10 14:31
Rob Stewart 
Kitware Robot 
normaltextN/A
closedmoved 
CMake 2.8.11 
 
0014425: ADD_DEPENDENCIES() Should Refer to ADD_CUSTOM_COMMAND() and ADD_CUSTOM_TARGET()
ADD_CUSTOM_TARGET() mentions ADD_DEPENDENCIES() and ADD_CUSTOM_COMMAND() as alternatives for different use cases. The documentation for ADD_DEPENDENCIES() should do the same.
No tags attached.
Issue History
2013-09-19 13:26Rob StewartNew Issue
2013-09-19 14:02Brad KingNote Added: 0033849
2013-09-19 14:14Rob StewartNote Added: 0033851
2016-06-10 14:29Kitware RobotNote Added: 0042368
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
(0033849)
Brad King   
2013-09-19 14:02   
The add_dependencies command already mentions add_custom_target and add_custom_command:

 http://www.cmake.org/cmake/help/v2.8.11/cmake.html#command:add_dependencies [^]
 "See the DEPENDS option of ADD_CUSTOM_TARGET and ADD_CUSTOM_COMMAND for
  adding file-level dependencies in custom rules"
(0033851)
Rob Stewart   
2013-09-19 14:14   
Ah, yes, you're right. I probably scanned add_definitions()'s paragraph when I thought the references were missing! Anyway, that text could be clearer. Perhaps the following would be good:

"To create a new target on which an existing target depends, use ADD_CUSTOM_TARGET(). To create a dependency on a file generated by a command, or to run a command before or after a target builds, use ADD_CUSTOM_COMMAND()."

I'd also suggest that it appear earlier in the description. That's a good idea for all related commands. That is, give a brief description in the first paragraph, mention any alternatives and reasons for choosing them instead in a second paragraph, then in the third and subsequent paragraphs, provide the details.
(0042368)
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.