Documentation states that DEPENDS option in add_custom_target() is only for files
This documentation page: https://cmake.org/cmake/help/git-master/command/add_custom_target.html#command:add_custom_target
States:
DEPENDS Reference files and outputs of custom commands created with add_custom_command() command calls in the same directory (CMakeLists.txt file). They will be brought up to date when the target is built. Use the add_dependencies() command to add dependencies on other targets.
However it seems to be possible to use the DEPENDS
option in add_custom_target()
to add dependencies to other custom targets.
Similarly this page: https://cmake.org/cmake/help/git-master/command/add_dependencies.html#command:add_dependencies
States:
See the DEPENDS option of add_custom_target() and add_custom_command() commands for adding file-level dependencies in custom rules.
Should the documentation be updated to reflect the fact that one seems to be able to use the DEPENDS
option in add_custom_target()
to add dependencies to other custom targets?