diff options
author | Brad King <brad.king@kitware.com> | 2023-02-15 13:57:24 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2023-02-15 13:57:32 (GMT) |
commit | e2ed34abf899ebe528709c2850503fd7ead544a9 (patch) | |
tree | 8ddec9a1d0ba63ef3e3548ed77616ccf8cbd93fb /Help | |
parent | a550db0d45ed8c56f642b07d05c9b18f7b6ed224 (diff) | |
parent | 082ccd75301cd02efd09bb9882bb9d2a8957193b (diff) | |
download | CMake-e2ed34abf899ebe528709c2850503fd7ead544a9.zip CMake-e2ed34abf899ebe528709c2850503fd7ead544a9.tar.gz CMake-e2ed34abf899ebe528709c2850503fd7ead544a9.tar.bz2 |
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
Diffstat (limited to 'Help')
-rw-r--r-- | Help/command/add_custom_command.rst | 18 | ||||
-rw-r--r-- | Help/release/dev/ninja-custom-command-depends.rst | 7 |
2 files changed, 24 insertions, 1 deletions
diff --git a/Help/command/add_custom_command.rst b/Help/command/add_custom_command.rst index 293d3f0..2cf88fc 100644 --- a/Help/command/add_custom_command.rst +++ b/Help/command/add_custom_command.rst @@ -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 ^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/Help/release/dev/ninja-custom-command-depends.rst b/Help/release/dev/ninja-custom-command-depends.rst new file mode 100644 index 0000000..10c68cf --- /dev/null +++ b/Help/release/dev/ninja-custom-command-depends.rst @@ -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. |