diff options
author | Daniel Eiband <daniel.eiband@brainlab.com> | 2019-09-11 10:45:50 (GMT) |
---|---|---|
committer | Daniel Eiband <daniel.eiband@brainlab.com> | 2019-09-12 14:03:12 (GMT) |
commit | f6574c9a816ffda7d9ff8c3f2e4ce0485cf28894 (patch) | |
tree | a79820bdc7fa07f7bc465b275e458542a263b3e2 /Help | |
parent | 2edb0b71edd36031f2fcc0b65633c1c16f8e9268 (diff) | |
download | CMake-f6574c9a816ffda7d9ff8c3f2e4ce0485cf28894.zip CMake-f6574c9a816ffda7d9ff8c3f2e4ce0485cf28894.tar.gz CMake-f6574c9a816ffda7d9ff8c3f2e4ce0485cf28894.tar.bz2 |
Depend: Hook up automatic target-level dependencies via byproducts
Target-level dependencies to utility targets are added from another target if
the other target requires a byproduct of the utility target or if it requires a
byproduct of PRE_BUILD, PRE_LINK, or POST_BUILD build events of a target.
Issue: #19005
Diffstat (limited to 'Help')
-rw-r--r-- | Help/command/add_custom_command.rst | 6 | ||||
-rw-r--r-- | Help/command/add_custom_target.rst | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/Help/command/add_custom_command.rst b/Help/command/add_custom_command.rst index ed321fc..ab2a023 100644 --- a/Help/command/add_custom_command.rst +++ b/Help/command/add_custom_command.rst @@ -68,9 +68,6 @@ The options are: order-only dependencies to ensure the byproducts will be available before their dependents build. - The ``BYPRODUCTS`` option is ignored on non-Ninja generators - except to mark byproducts ``GENERATED``. - ``COMMAND`` Specify the command-line(s) to execute at build time. If more than one ``COMMAND`` is specified they will be executed in order, @@ -111,6 +108,9 @@ The options are: an ``OUTPUT`` of another custom command in the same directory (``CMakeLists.txt`` file) CMake automatically brings the other custom command into the target in which this command is built. + A target-level dependency is added if any dependency is listed as + ``BYPRODUCTS`` of a target or any of its build events in the same + directory to ensure the byproducts will be available. If ``DEPENDS`` is not specified the command will run whenever the ``OUTPUT`` is missing; if the command does not actually create the ``OUTPUT`` then the rule will always run. diff --git a/Help/command/add_custom_target.rst b/Help/command/add_custom_target.rst index 08b9516..e74960c 100644 --- a/Help/command/add_custom_target.rst +++ b/Help/command/add_custom_target.rst @@ -49,9 +49,6 @@ The options are: order-only dependencies to ensure the byproducts will be available before their dependents build. - The ``BYPRODUCTS`` option is ignored on non-Ninja generators - except to mark byproducts ``GENERATED``. - ``COMMAND`` Specify the command-line(s) to execute at build time. If more than one ``COMMAND`` is specified they will be executed in order, @@ -86,6 +83,9 @@ The options are: :command:`add_custom_command` command calls in the same directory (``CMakeLists.txt`` file). They will be brought up to date when the target is built. + A target-level dependency is added if any dependency is a byproduct + of a target or any of its build events in the same directory to ensure + the byproducts will be available before this target is built. Use the :command:`add_dependencies` command to add dependencies on other targets. |