mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-06 22:30:07 -05:00
Merge topic 'ninja-custom-command-depends'
082ccd7530 add_custom_command: Add DEPENDS_EXPLICIT_ONLY option for Ninja
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8198
This commit is contained in:
@@ -25,7 +25,8 @@ The first signature is for adding a custom command to produce an output:
|
||||
[DEPFILE depfile]
|
||||
[JOB_POOL job_pool]
|
||||
[VERBATIM] [APPEND] [USES_TERMINAL]
|
||||
[COMMAND_EXPAND_LISTS])
|
||||
[COMMAND_EXPAND_LISTS]
|
||||
[DEPENDS_EXPLICIT_ONLY])
|
||||
|
||||
This defines a command to generate specified ``OUTPUT`` file(s).
|
||||
A target created in the same directory (``CMakeLists.txt`` file)
|
||||
@@ -357,6 +358,21 @@ The options are:
|
||||
:ref:`Makefile Generators`, :ref:`Visual Studio Generators`,
|
||||
and the :generator:`Xcode` generator.
|
||||
|
||||
``DEPENDS_EXPLICIT_ONLY``
|
||||
|
||||
.. versionadded:: 3.27
|
||||
|
||||
Indicate that the command's ``DEPENDS`` argument represents all files
|
||||
required by the command and implicit dependencies are not required.
|
||||
|
||||
Without this option, if any target uses the output of the custom command,
|
||||
CMake will consider that target's dependencies as implicit dependencies for
|
||||
the custom command in case this custom command requires files implicitly
|
||||
created by those targets.
|
||||
|
||||
Only the :ref:`Ninja Generators` actually use this information to remove
|
||||
unnecessary implicit dependencies.
|
||||
|
||||
Examples: Generating Files
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
ninja-custom-command-depends
|
||||
----------------------------
|
||||
|
||||
* The :command:`add_custom_command` command gained a new
|
||||
``DEPENDS_EXPLICIT_ONLY`` option to tell the :ref:`Ninja Generators`
|
||||
not to add any dependencies implied by the target to which it is
|
||||
attached.
|
||||
Reference in New Issue
Block a user