Help: Replace some versionadded directives with versionchanged

`.. versionchanged` directive might be more appropriate when
documentation refers to previous CMake version, old behavior
or a policy, and there's no new parameter or a variable involved.

Issue: #19715
This commit is contained in:
Nikita Nemkin 2020-11-10 19:53:41 +05:00
parent 8b9497e3e5
commit a19058d7d8
13 changed files with 19 additions and 19 deletions

View File

@ -107,7 +107,7 @@ The options are:
(``CMakeLists.txt`` file). They will be brought up to date when (``CMakeLists.txt`` file). They will be brought up to date when
the target is built. the target is built.
.. versionadded:: 3.16 .. versionchanged:: 3.16
A target-level dependency is added if any dependency is a byproduct A target-level dependency is added if any dependency is a byproduct
of a target or any of its build events in the same directory to ensure of a target or any of its build events in the same directory to ensure
the byproducts will be available before this target is built. the byproducts will be available before this target is built.

View File

@ -41,7 +41,7 @@ The ``<multi_value_keywords>`` argument contains all keywords for this
macro which can be followed by more than one value, like e.g. the macro which can be followed by more than one value, like e.g. the
``TARGETS`` or ``FILES`` keywords of the :command:`install` command. ``TARGETS`` or ``FILES`` keywords of the :command:`install` command.
.. versionadded:: 3.5 .. versionchanged:: 3.5
All keywords shall be unique. I.e. every keyword shall only be specified All keywords shall be unique. I.e. every keyword shall only be specified
once in either ``<options>``, ``<one_value_keywords>`` or once in either ``<options>``, ``<one_value_keywords>`` or
``<multi_value_keywords>``. A warning will be emitted if uniqueness is ``<multi_value_keywords>``. A warning will be emitted if uniqueness is

View File

@ -52,7 +52,7 @@ The options are:
``PROJECT_NAME <project-name>`` ``PROJECT_NAME <project-name>``
Ignored since CMake 3.0. Ignored since CMake 3.0.
.. versionadded:: 3.14 .. versionchanged:: 3.14
This value is no longer required. This value is no longer required.
``TARGET <target-name>`` ``TARGET <target-name>``

View File

@ -31,7 +31,7 @@ The parameters are as follows:
CDash server. If no ``GROUP`` is specified, the name of the model is used by CDash server. If no ``GROUP`` is specified, the name of the model is used by
default. default.
.. versionadded:: 3.16 .. versionchanged:: 3.16
This replaces the deprecated option ``TRACK``. Despite the name This replaces the deprecated option ``TRACK``. Despite the name
change its behavior is unchanged. change its behavior is unchanged.

View File

@ -64,11 +64,11 @@ build tree. In some cases, for example for packaging and for system
wide installations, it is not desirable to write the user package wide installations, it is not desirable to write the user package
registry. registry.
.. versionadded:: 3.1 .. versionchanged:: 3.1
If the :variable:`CMAKE_EXPORT_NO_PACKAGE_REGISTRY` variable If the :variable:`CMAKE_EXPORT_NO_PACKAGE_REGISTRY` variable
is enabled, the ``export(PACKAGE)`` command will do nothing. is enabled, the ``export(PACKAGE)`` command will do nothing.
.. versionadded:: 3.15 .. versionchanged:: 3.15
By default the ``export(PACKAGE)`` command does nothing (see policy By default the ``export(PACKAGE)`` command does nothing (see policy
:policy:`CMP0090`) because populating the user package registry has effects :policy:`CMP0090`) because populating the user package registry has effects
outside the source and build trees. Set the outside the source and build trees. Set the

View File

@ -497,7 +497,7 @@ from the input content to produce the output content. The options are:
``INPUT <input-file>`` ``INPUT <input-file>``
Use the content from a given file as input. Use the content from a given file as input.
.. versionadded:: 3.10 .. versionchanged:: 3.10
A relative path is treated with respect to the value of A relative path is treated with respect to the value of
:variable:`CMAKE_CURRENT_SOURCE_DIR`. See policy :policy:`CMP0070`. :variable:`CMAKE_CURRENT_SOURCE_DIR`. See policy :policy:`CMP0070`.
@ -508,7 +508,7 @@ from the input content to produce the output content. The options are:
if the generated content is identical. Otherwise, the ``<output-file>`` if the generated content is identical. Otherwise, the ``<output-file>``
must evaluate to an unique name for each configuration. must evaluate to an unique name for each configuration.
.. versionadded:: 3.10 .. versionchanged:: 3.10
A relative path (after evaluating generator expressions) is treated A relative path (after evaluating generator expressions) is treated
with respect to the value of :variable:`CMAKE_CURRENT_BINARY_DIR`. with respect to the value of :variable:`CMAKE_CURRENT_BINARY_DIR`.
See policy :policy:`CMP0070`. See policy :policy:`CMP0070`.
@ -591,7 +591,7 @@ regular expressions, but much simpler. If ``RELATIVE`` flag is
specified, the results will be returned as relative paths to the given specified, the results will be returned as relative paths to the given
path. path.
.. versionadded:: 3.6 .. versionchanged:: 3.6
The results will be ordered lexicographically. The results will be ordered lexicographically.
On Windows and macOS, globbing is case-insensitive even if the underlying On Windows and macOS, globbing is case-insensitive even if the underlying
@ -662,7 +662,7 @@ files and directories, also non-empty directories. No error is emitted if a
given file does not exist. Relative input paths are evaluated with respect given file does not exist. Relative input paths are evaluated with respect
to the current source directory. to the current source directory.
.. versionadded:: 3.15 .. versionchanged:: 3.15
Empty input paths are ignored with a warning. Previous versions of CMake Empty input paths are ignored with a warning. Previous versions of CMake
interpreted empty string as a relative path with respect to the current interpreted empty string as a relative path with respect to the current
directory and removed its contents. directory and removed its contents.

View File

@ -3,7 +3,7 @@ get_filename_component
Get a specific component of a full filename. Get a specific component of a full filename.
.. versionadded:: 3.19 .. versionchanged:: 3.19
This command been superseded by :command:`cmake_path` command, except This command been superseded by :command:`cmake_path` command, except
``REALPATH`` now offered by :ref:`file(REAL_PATH) <REAL_PATH>` command and ``REALPATH`` now offered by :ref:`file(REAL_PATH) <REAL_PATH>` command and
``PROGRAM`` now available in :command:`separate_arguments(PROGRAM)` command. ``PROGRAM`` now available in :command:`separate_arguments(PROGRAM)` command.

View File

@ -281,7 +281,7 @@ above-documented condition syntax accepts ``<variable|string>``:
tested to see if they are boolean constants, if so they are used as tested to see if they are boolean constants, if so they are used as
such, otherwise they are assumed to be variables and are dereferenced. such, otherwise they are assumed to be variables and are dereferenced.
.. versionadded:: 3.1 .. versionchanged:: 3.1
To prevent ambiguity, potential variable or keyword names can be To prevent ambiguity, potential variable or keyword names can be
specified in a :ref:`Quoted Argument` or a :ref:`Bracket Argument`. specified in a :ref:`Quoted Argument` or a :ref:`Bracket Argument`.
A quoted or bracketed variable or keyword will be interpreted as a A quoted or bracketed variable or keyword will be interpreted as a

View File

@ -22,7 +22,7 @@ This command generates installation rules for a project. Install rules
specified by calls to the ``install()`` command within a source directory specified by calls to the ``install()`` command within a source directory
are executed in order during installation. are executed in order during installation.
.. versionadded:: 3.14 .. versionchanged:: 3.14
Install rules in subdirectories Install rules in subdirectories
added by calls to the :command:`add_subdirectory` command are interleaved added by calls to the :command:`add_subdirectory` command are interleaved
with those in the parent directory to run in the order declared (see with those in the parent directory to run in the order declared (see

View File

@ -23,6 +23,6 @@ new values will be marked as advanced, but if a
variable already has an advanced/non-advanced state, variable already has an advanced/non-advanced state,
it will not be changed. it will not be changed.
.. versionadded:: 3.17 .. versionchanged:: 3.17
Variables passed to this command which are not already in the cache Variables passed to this command which are not already in the cache
are ignored. See policy :policy:`CMP0102`. are ignored. See policy :policy:`CMP0102`.

View File

@ -281,7 +281,7 @@ Store in an ``<output_variable>`` a substring of a given ``<string>``. If
``<length>`` is ``-1`` the remainder of the string starting at ``<begin>`` ``<length>`` is ``-1`` the remainder of the string starting at ``<begin>``
will be returned. will be returned.
.. versionadded:: 3.2 .. versionchanged:: 3.2
If ``<string>`` is shorter than ``<length>`` then the end of the string If ``<string>`` is shorter than ``<length>`` then the end of the string
is used instead. Previous versions of CMake reported an error in this case. is used instead. Previous versions of CMake reported an error in this case.

View File

@ -17,7 +17,7 @@ The named ``<target>`` must have been created by a command such as
:command:`add_custom_target` and must not be an :command:`add_custom_target` and must not be an
:ref:`ALIAS target <Alias Targets>`. :ref:`ALIAS target <Alias Targets>`.
.. versionadded:: 3.13 .. versionchanged:: 3.13
Relative source file paths are interpreted as being relative to the current Relative source file paths are interpreted as being relative to the current
source directory (i.e. :variable:`CMAKE_CURRENT_SOURCE_DIR`). source directory (i.e. :variable:`CMAKE_CURRENT_SOURCE_DIR`).
See policy :policy:`CMP0076`. See policy :policy:`CMP0076`.

View File

@ -162,7 +162,7 @@ Other Behavior Settings
If :policy:`CMP0056` is set to ``NEW``, then If :policy:`CMP0056` is set to ``NEW``, then
:variable:`CMAKE_EXE_LINKER_FLAGS` is passed in as well. :variable:`CMAKE_EXE_LINKER_FLAGS` is passed in as well.
.. versionadded:: 3.14 .. versionchanged:: 3.14
If :policy:`CMP0083` is set to ``NEW``, then in order to obtain correct If :policy:`CMP0083` is set to ``NEW``, then in order to obtain correct
behavior at link time, the ``check_pie_supported()`` command from the behavior at link time, the ``check_pie_supported()`` command from the
:module:`CheckPIESupported` module must be called before using the :module:`CheckPIESupported` module must be called before using the
@ -185,7 +185,7 @@ a build configuration.
``try_compile()`` command for the source files form, not when given a whole ``try_compile()`` command for the source files form, not when given a whole
project. project.
.. versionadded:: 3.8 .. versionchanged:: 3.8
If :policy:`CMP0067` is set to ``NEW``, or any of the ``<LANG>_STANDARD``, If :policy:`CMP0067` is set to ``NEW``, or any of the ``<LANG>_STANDARD``,
``<LANG>_STANDARD_REQUIRED``, or ``<LANG>_EXTENSIONS`` options are used, ``<LANG>_STANDARD_REQUIRED``, or ``<LANG>_EXTENSIONS`` options are used,
then the language standard variables are honored: then the language standard variables are honored:
@ -209,6 +209,6 @@ a build configuration.
Their values are used to set the corresponding target properties in Their values are used to set the corresponding target properties in
the generated project (unless overridden by an explicit option). the generated project (unless overridden by an explicit option).
.. versionadded:: 3.14 .. versionchanged:: 3.14
For the :generator:`Green Hills MULTI` generator the GHS toolset and target For the :generator:`Green Hills MULTI` generator the GHS toolset and target
system customization cache variables are also propagated into the test project. system customization cache variables are also propagated into the test project.