diff options
author | Brad King <brad.king@kitware.com> | 2021-07-26 13:39:43 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2021-07-26 13:39:55 (GMT) |
commit | 2cc59a80b85979429c0c20bb90696bc228c5de3d (patch) | |
tree | 3f0e711b980e44625842cfb5d0f14fbaf6df864e /Help | |
parent | b9ee85cc291d639ae1df3b13a75be149aae31b45 (diff) | |
parent | f6e5743d0eb52dddd9183be65b5374ea2cd8c772 (diff) | |
download | CMake-2cc59a80b85979429c0c20bb90696bc228c5de3d.zip CMake-2cc59a80b85979429c0c20bb90696bc228c5de3d.tar.gz CMake-2cc59a80b85979429c0c20bb90696bc228c5de3d.tar.bz2 |
Merge topic 'doc-custom-command-depfiles'
f6e5743d0e Help: Clarify and correct wording around DEPFILE option
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6387
Diffstat (limited to 'Help')
-rw-r--r-- | Help/command/add_custom_command.rst | 41 |
1 files changed, 23 insertions, 18 deletions
diff --git a/Help/command/add_custom_command.rst b/Help/command/add_custom_command.rst index d881a66..b45a079 100644 --- a/Help/command/add_custom_command.rst +++ b/Help/command/add_custom_command.rst @@ -271,35 +271,40 @@ The options are: ``DEPFILE`` .. versionadded:: 3.7 - Specify a ``.d`` depfile for the :generator:`Ninja`, :generator:`Xcode` and - :ref:`Makefile <Makefile Generators>` generators. The depfile may use - "generator expressions" with the syntax ``$<...>``. See the - :manual:`generator-expressions(7) <cmake-generator-expressions(7)>` manual - for available expressions. A ``.d`` file holds dependencies usually emitted - by the custom command itself. + Specify a ``.d`` depfile which holds dependencies for the custom command. + It is usually emitted by the custom command itself. This keyword may only + be used if the generator supports it, as detailed below. - Using ``DEPFILE`` with other generators than :generator:`Ninja`, - :generator:`Xcode` or :ref:`Makefile <Makefile Generators>` is an error. + .. versionadded:: 3.7 + The :generator:`Ninja` generator supports ``DEPFILE`` since the keyword + was first added. + + .. versionadded:: 3.17 + Added the :generator:`Ninja Multi-Config` generator, which included + support for the ``DEPFILE`` keyword. .. versionadded:: 3.20 Added support for :ref:`Makefile Generators`. + .. note:: + + ``DEPFILE`` cannot be specified at the same time as the + ``IMPLICIT_DEPENDS`` option for :ref:`Makefile Generators`. + .. versionadded:: 3.21 Added support for :ref:`Visual Studio Generators` with VS 2012 and above, - for the :generator:`Xcode` generator, and for - :manual:`generator expressions <cmake-generator-expressions(7)>`. + and for the :generator:`Xcode` generator. Support for + :manual:`generator expressions <cmake-generator-expressions(7)>` was also + added. + + Using ``DEPFILE`` with generators other than those listed above is an error. If the ``DEPFILE`` argument is relative, it should be relative to :variable:`CMAKE_CURRENT_BINARY_DIR`, and any relative paths inside the - ``DEPFILE`` should also be relative to :variable:`CMAKE_CURRENT_BINARY_DIR` - (see policy :policy:`CMP0116`. This policy is always ``NEW`` for + ``DEPFILE`` should also be relative to :variable:`CMAKE_CURRENT_BINARY_DIR`. + See policy :policy:`CMP0116`, which is always ``NEW`` for :ref:`Makefile Generators`, :ref:`Visual Studio Generators`, - and the :generator:`Xcode` generator). - - .. note:: - - For :ref:`Makefile Generators`, this option cannot be specified at the - same time as ``IMPLICIT_DEPENDS`` option. + and the :generator:`Xcode` generator. Examples: Generating Files ^^^^^^^^^^^^^^^^^^^^^^^^^^ |