mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-23 00:48:55 +08:00
Help: Clarify and correct wording around DEPFILE option
The previous wording contradicted itself regarding whether Visual Studio generators were supported, and about when generator expressions could be used. Restructure the paragraphs and max it clearer what support was added in which CMake versions.
This commit is contained in:
@@ -271,35 +271,40 @@ The options are:
|
|||||||
``DEPFILE``
|
``DEPFILE``
|
||||||
.. versionadded:: 3.7
|
.. versionadded:: 3.7
|
||||||
|
|
||||||
Specify a ``.d`` depfile for the :generator:`Ninja`, :generator:`Xcode` and
|
Specify a ``.d`` depfile which holds dependencies for the custom command.
|
||||||
:ref:`Makefile <Makefile Generators>` generators. The depfile may use
|
It is usually emitted by the custom command itself. This keyword may only
|
||||||
"generator expressions" with the syntax ``$<...>``. See the
|
be used if the generator supports it, as detailed below.
|
||||||
:manual:`generator-expressions(7) <cmake-generator-expressions(7)>` manual
|
|
||||||
for available expressions. A ``.d`` file holds dependencies usually emitted
|
|
||||||
by the custom command itself.
|
|
||||||
|
|
||||||
Using ``DEPFILE`` with other generators than :generator:`Ninja`,
|
.. versionadded:: 3.7
|
||||||
:generator:`Xcode` or :ref:`Makefile <Makefile Generators>` is an error.
|
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
|
.. versionadded:: 3.20
|
||||||
Added support for :ref:`Makefile Generators`.
|
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
|
.. versionadded:: 3.21
|
||||||
Added support for :ref:`Visual Studio Generators` with VS 2012 and above,
|
Added support for :ref:`Visual Studio Generators` with VS 2012 and above,
|
||||||
for the :generator:`Xcode` generator, and for
|
and for the :generator:`Xcode` generator. Support for
|
||||||
:manual:`generator expressions <cmake-generator-expressions(7)>`.
|
: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
|
If the ``DEPFILE`` argument is relative, it should be relative to
|
||||||
:variable:`CMAKE_CURRENT_BINARY_DIR`, and any relative paths inside the
|
:variable:`CMAKE_CURRENT_BINARY_DIR`, and any relative paths inside the
|
||||||
``DEPFILE`` should also be relative to :variable:`CMAKE_CURRENT_BINARY_DIR`
|
``DEPFILE`` should also be relative to :variable:`CMAKE_CURRENT_BINARY_DIR`.
|
||||||
(see policy :policy:`CMP0116`. This policy is always ``NEW`` for
|
See policy :policy:`CMP0116`, which is always ``NEW`` for
|
||||||
:ref:`Makefile Generators`, :ref:`Visual Studio Generators`,
|
:ref:`Makefile Generators`, :ref:`Visual Studio Generators`,
|
||||||
and the :generator:`Xcode` generator).
|
and the :generator:`Xcode` generator.
|
||||||
|
|
||||||
.. note::
|
|
||||||
|
|
||||||
For :ref:`Makefile Generators`, this option cannot be specified at the
|
|
||||||
same time as ``IMPLICIT_DEPENDS`` option.
|
|
||||||
|
|
||||||
Examples: Generating Files
|
Examples: Generating Files
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
Reference in New Issue
Block a user