diff options
author | Brad King <brad.king@kitware.com> | 2019-09-13 13:56:02 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-09-13 13:56:20 (GMT) |
commit | 19bcdca93c3a05db12652677f8d0e310797bb375 (patch) | |
tree | a7d0b2b77b8aaef0ce3e99ad09a9f24f8cd068ce /Help | |
parent | 0b8c0b26ce076952bfdc0392d2c93c3597974c9f (diff) | |
parent | 482d858500a42a63c97d3dc11ae74d81a10bab3f (diff) | |
download | CMake-19bcdca93c3a05db12652677f8d0e310797bb375.zip CMake-19bcdca93c3a05db12652677f8d0e310797bb375.tar.gz CMake-19bcdca93c3a05db12652677f8d0e310797bb375.tar.bz2 |
Merge topic 'target-level-dependencies-via-byproducts'
482d858500 Depend: Add test for target-level dependencies via byproducts
f6574c9a81 Depend: Hook up automatic target-level dependencies via byproducts
2edb0b71ed cmMakefile: Add lookup from source name to targets via byproducts
62d5932389 Refatoring: Extract AnyOutputMatches utility
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3806
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. |