diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2020-12-04 17:35:04 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2020-12-23 14:47:46 (GMT) |
commit | cfd8a5ac1f443725342517ddbaee51692d8d0324 (patch) | |
tree | bf2224cb9c6b6ba1a7aed1eb2fbcaf31799cbc17 /Help | |
parent | a526f71266c2fed017c65a3d90b63286221476c0 (diff) | |
download | CMake-cfd8a5ac1f443725342517ddbaee51692d8d0324.zip CMake-cfd8a5ac1f443725342517ddbaee51692d8d0324.tar.gz CMake-cfd8a5ac1f443725342517ddbaee51692d8d0324.tar.bz2 |
Makefiles: Add support of DEPFILE for add_custom_command
Issue: #20286
Fixes: #21415
Diffstat (limited to 'Help')
-rw-r--r-- | Help/command/add_custom_command.rst | 21 | ||||
-rw-r--r-- | Help/release/dev/makefile-depfile.rst | 5 |
2 files changed, 23 insertions, 3 deletions
diff --git a/Help/command/add_custom_command.rst b/Help/command/add_custom_command.rst index 567af16..9a4efd1 100644 --- a/Help/command/add_custom_command.rst +++ b/Help/command/add_custom_command.rst @@ -201,6 +201,10 @@ The options are: Note that the ``IMPLICIT_DEPENDS`` option is currently supported only for Makefile generators and will be ignored by other generators. + .. note:: + + This option cannot be specified at the same time as ``DEPFILE`` option. + ``JOB_POOL`` .. versionadded:: 3.15 @@ -263,15 +267,26 @@ The options are: ``DEPFILE`` .. versionadded:: 3.7 - Specify a ``.d`` depfile for the :generator:`Ninja` generator. + Specify a ``.d`` depfile for the :generator:`Ninja` generator and + :ref:`Makefile Generators`. A ``.d`` file holds dependencies usually emitted by the custom command itself. - Using ``DEPFILE`` with other generators than Ninja is an error. + Using ``DEPFILE`` with other generators than :generator:`Ninja` or + :ref:`Makefile Generators` is an error. + + .. versionadded:: 3.20 + Added the support of :ref:`Makefile Generators`. 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`.) + (see policy :policy:`CMP0116`. This policy is always ``NEW`` for + :ref:`Makefile Generators`). + + .. note:: + + For :ref:`Makefile Generators`, this option cannot be specified at the + same time as ``IMPLICIT_DEPENDS`` option. Examples: Generating Files ^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/Help/release/dev/makefile-depfile.rst b/Help/release/dev/makefile-depfile.rst new file mode 100644 index 0000000..4a3e5fb --- /dev/null +++ b/Help/release/dev/makefile-depfile.rst @@ -0,0 +1,5 @@ +makefile-depfile +---------------- + +* The :command:`add_custom_command` command gained ``DEPFILE`` support on + :ref:`Makefile Generators`. |