mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
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
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user