summaryrefslogtreecommitdiffstats
path: root/Help/command/add_custom_command.rst
diff options
context:
space:
mode:
authorNikita Nemkin <nikita@nemkin.ru>2020-11-07 20:30:30 (GMT)
committerNikita Nemkin <nikita@nemkin.ru>2020-11-09 15:51:57 (GMT)
commitc705279bae45c85b689febd66d5437d9ec05c9b9 (patch)
treef64bca14f17a902a96d67a30357df3d1e6c745eb /Help/command/add_custom_command.rst
parent63a1917d098922b59bbba8fdeb42519363d5ba0d (diff)
downloadCMake-c705279bae45c85b689febd66d5437d9ec05c9b9.zip
CMake-c705279bae45c85b689febd66d5437d9ec05c9b9.tar.gz
CMake-c705279bae45c85b689febd66d5437d9ec05c9b9.tar.bz2
Help: Add `.. versionadded` directives to commands documentation
This change ony concerns directives that appear in the document body. The guidelines for inserting version directives: * Baseline version is CMake 3.0, i.e. directives start at 3.1. * Always use `.. versionadded::` directive, avoid ad-hoc version references. Exception: policy pages. * For new command signatures, put `versionadded` on a separate line after the signature. * For a group of new signatures in a new document section, a single version note at the beginning of the section is sufficient. * For new options, put `versionadded` on a separate line before option description. * If all the option descriptions in the list are short one-liners, it's fine to put `versionadded` on the same line as the description. * If multiple option descriptions in close proximity would have the same ..versionadded directive, consider adding a single directive after the list, mentioning all added options. * For compact value lists and sub-option lists, put a single `versionadded` directive after the list mentioning all additions. * When a change is described in a single paragraph, put `versionadded` into that paragraph. * When only part of the paragraph has changed, separate the changed part if it doesn't break the flow. Otherwise, write a follow-up clarification paragraph and apply version directive to that. * When multiple version directives are close by, order earlier additions before later additions. * Indent related lists and code blocks to include them in the scope of `versionadded` directive. Issue: #19715
Diffstat (limited to 'Help/command/add_custom_command.rst')
-rw-r--r--Help/command/add_custom_command.rst37
1 files changed, 26 insertions, 11 deletions
diff --git a/Help/command/add_custom_command.rst b/Help/command/add_custom_command.rst
index a28b0b1..45e4e3e 100644
--- a/Help/command/add_custom_command.rst
+++ b/Help/command/add_custom_command.rst
@@ -51,6 +51,8 @@ The options are:
used in the future.
``BYPRODUCTS``
+ .. versionadded:: 3.2
+
Specify the files the command is expected to produce but whose
modification time may or may not be newer than the dependencies.
If a byproduct name is a relative path it will be interpreted
@@ -88,10 +90,11 @@ The options are:
* The target is not being cross-compiled (i.e. the
:variable:`CMAKE_CROSSCOMPILING` variable is not set to true).
- * The target is being cross-compiled and an emulator is provided (i.e.
- its :prop_tgt:`CROSSCOMPILING_EMULATOR` target property is set).
- In this case, the contents of :prop_tgt:`CROSSCOMPILING_EMULATOR` will be
- prepended to the command before the location of the target executable.
+ * .. versionadded:: 3.6
+ The target is being cross-compiled and an emulator is provided (i.e.
+ its :prop_tgt:`CROSSCOMPILING_EMULATOR` target property is set).
+ In this case, the contents of :prop_tgt:`CROSSCOMPILING_EMULATOR` will be
+ prepended to the command before the location of the target executable.
If neither of the above conditions are met, it is assumed that the
command name is a program to be found on the ``PATH`` at build time.
@@ -153,18 +156,23 @@ The options are:
If any dependency is an ``OUTPUT`` of another custom command in the same
directory (``CMakeLists.txt`` file), CMake automatically brings the other
custom command into the target in which this command is built.
- A target-level dependency is added if any dependency is listed as
- ``BYPRODUCTS`` of a target or any of its build events in the same
- directory to ensure the byproducts will be available.
+
+ .. versionadded:: 3.16
+ A target-level dependency is added if any dependency is listed as
+ ``BYPRODUCTS`` of a target or any of its build events in the same
+ directory to ensure the byproducts will be available.
If ``DEPENDS`` is not specified, the command will run whenever
the ``OUTPUT`` is missing; if the command does not actually
create the ``OUTPUT``, the rule will always run.
- Arguments to ``DEPENDS`` may use
- :manual:`generator expressions <cmake-generator-expressions(7)>`.
+ .. versionadded:: 3.1
+ Arguments to ``DEPENDS`` may use
+ :manual:`generator expressions <cmake-generator-expressions(7)>`.
``COMMAND_EXPAND_LISTS``
+ .. versionadded:: 3.8
+
Lists in ``COMMAND`` arguments will be expanded, including those
created with
:manual:`generator expressions <cmake-generator-expressions(7)>`,
@@ -184,6 +192,8 @@ The options are:
only for Makefile generators and will be ignored by other generators.
``JOB_POOL``
+ .. versionadded:: 3.15
+
Specify a :prop_gbl:`pool <JOB_POOLS>` for the :generator:`Ninja`
generator. Incompatible with ``USES_TERMINAL``, which implies
the ``console`` pool.
@@ -211,6 +221,8 @@ The options are:
source file property.
``USES_TERMINAL``
+ .. versionadded:: 3.2
+
The command will be given direct access to the terminal if possible.
With the :generator:`Ninja` generator, this places the command in
the ``console`` :prop_gbl:`pool <JOB_POOLS>`.
@@ -230,10 +242,13 @@ The options are:
If it is a relative path it will be interpreted relative to the
build tree directory corresponding to the current source directory.
- Arguments to ``WORKING_DIRECTORY`` may use
- :manual:`generator expressions <cmake-generator-expressions(7)>`.
+ .. versionadded:: 3.13
+ Arguments to ``WORKING_DIRECTORY`` may use
+ :manual:`generator expressions <cmake-generator-expressions(7)>`.
``DEPFILE``
+ .. versionadded:: 3.7
+
Specify a ``.d`` depfile for the :generator:`Ninja` generator.
A ``.d`` file holds dependencies usually emitted by the custom
command itself.