Merge topic 'doc-polish'

6babe38916 Help: Fix cmake_language(TRACE) command anchor
7aa81ae324 Help: Simplify release notes for find module version variables
09aded59f7 Help: Revise CMP0201 documentation using typical wording conventions
f98b4eecf6 Help: Document generators supporting CMAKE_INTERMEDIATE_DIR_STRATEGY
fe9fd66a8e Help: Improve CPack/WiX documentation markup

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11276
This commit is contained in:
Brad King
2025-10-02 17:52:03 +00:00
committed by Kitware Robot
8 changed files with 36 additions and 168 deletions

View File

@@ -536,8 +536,6 @@ Terminating Scripts
above 125 specially. Therefore, it is advisable to only
specify an ``<exit-code>`` in the range 0 to 125.
.. _trace:
Trace Control
^^^^^^^^^^^^^
@@ -546,6 +544,9 @@ Trace Control
.. signature::
cmake_language(TRACE ON [EXPAND])
cmake_language(TRACE OFF)
:target:
TRACE
TRACE-OFF
The TRACE subcommand controls runtime tracing of executed CMake commands and
macros within the current process. When enabled, trace output is written

View File

@@ -492,7 +492,8 @@ Windows using WiX.
.. versionadded:: 4.2
If this variable is set to true one `.cab` file per component is created.
The default is to create a single `.cab` file for all files in the installer.
If this variable is set to true one ``.cab`` file per component is created.
The default is to create a single ``.cab`` file for all files in the installer.
WiX creates `.cab` files in parallel so multiple `.cab` files may be desirable for faster packaging.
WiX creates ``.cab`` files in parallel so multiple ``.cab`` files may be
desirable for faster packaging.

View File

@@ -100,7 +100,7 @@ Policies Introduced by CMake 4.2
CMP0203: _WINDLL is defined for shared libraries targeting the MSVC ABI. </policy/CMP0203>
CMP0202: PDB file names always include their target's per-config POSTFIX. </policy/CMP0202>
CMP0201: The Python::NumPy target does not depend on the Python::Module target. </policy/CMP0201>
CMP0201: Python::NumPy does not depend on Python::Development.Module. </policy/CMP0201>
CMP0200: Location and configuration selection for imported targets is more consistent. </policy/CMP0200>
CMP0199: $<CONFIG> only matches the configuration of the consumed target. </policy/CMP0199>
CMP0198: CMAKE_PARENT_LIST_FILE is not defined in CMakeLists.txt. </policy/CMP0198>

View File

@@ -3,32 +3,26 @@ CMP0201
.. versionadded:: 4.2
The modules :module:`FindPython3`, :module:`FindPython2` and
:module:`FindPython` change the handling of the ``NumPy``
component and, respectively, the definition of the ``Python3::NumPy``,
``Python2::NumPy`` and ``Python::NumPy`` targets.
``Python::NumPy`` does not depend on ``Python::Development.Module``.
For CMake 4.2 and above, the specification of the ``NumPy`` component does not
imply anymore the component ``Development.Module`` and the ``Python3::NumPy``,
``Python2::NumPy`` and ``Python::NumPy`` targets provided, respectively, by the
modules :module:`FindPython3`, :module:`FindPython2` and :module:`FindPython`
do not depend on the ``Python3::Development.Module``,
``Python2::Development.Module`` and ``Python::Development.Module`` targets.
For CMake 4.1 and below, the specification of the ``NumPy`` component imply the
component ``Development.Module`` and the ``Python3::NumPy``, ``Python2::NumPy``
and ``Python::NumPy`` targets provided, respectively, by the modules
:module:`FindPython3`, :module:`FindPython2` and :module:`FindPython` depend on
the ``Python3::Development.Module``, ``Python2::Development.Module`` and
``Python::Development.Module`` targets.
The ``OLD`` behavior for this policy creates a dependency of the ``NumPy``
target over the ``Development.Module`` target. The ``NEW`` behavior does not
create a dependency of the ``NumPy`` target over the ``Development.Module``
target.
:module:`FindPython3`, :module:`FindPython2`, and :module:`FindPython` provide
``Python{3,2,}::NumPy`` and ``Python{3,2,}::Development.Module`` targets when
the corresponding components are requested.
In CMake 4.1 and below, requesting the ``NumPy`` component implies the
``Development.Module`` component, and the provided ``Python{3,2,}::NumPy``
targets depend on the provided ``Python{3,2,}::Development.Module`` targets.
This dependency is not necessary.
In CMake 4.2 and above, requesting the ``NumPy`` component does not imply the
``Development.Module`` component, and the provided ``Python{3,2,}::NumPy``
targets do not depend on the provided ``Python{3,2,}::Development.Module``
targets.
This policy provides compatibility with projects that expect the legacy
behavior.
The ``OLD`` behavior for this policy makes ``NumPy`` depend on
``Development.Module``. The ``NEW`` behavior for this policy does not.
.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 4.2
.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn
.. include:: include/STANDARD_ADVICE.rst

View File

@@ -5,136 +5,10 @@ Find Modules
are now deprecated in favor of ``<PackageName>_FOUND`` result variables,
where appropriate. See documentation of each find module for details.
* The :module:`FindALSA` module now provides a ``ALSA_VERSION`` result
variable. The ``ALSA_VERSION_STRING`` result variable is deprecated.
* The :module:`FindArmadillo` module now provides an ``Armadillo_VERSION``,
and ``Armadillo_VERSION_NAME`` result variables. The
``ARMADILLO_VERSION_STRING``, ``ARMADILLO_VERSION_MAJOR``,
``ARMADILLO_VERSION_MINOR``, ``ARMADILLO_VERSION_PATCH``, and
``ARMADILLO_VERSION_NAME`` result variables are deprecated.
* The :module:`FindBZip2` module now provides a ``BZip2_VERSION`` result
variable. The ``BZIP2_VERSION`` result variable is deprecated.
* The :module:`FindCups` module now provides a ``Cups_VERSION`` result
variable. The ``CUPS_VERSION_STRING`` result variable is deprecated.
* The :module:`FindDoxygen` module now provides a ``Doxygen_VERSION`` result
variable. The ``DOXYGEN_VERSION`` result variable is deprecated.
* The :module:`FindEXPAT` module now provides a ``EXPAT_VERSION`` result
variable. The ``EXPAT_VERSION_STRING`` result variable is deprecated.
* The :module:`FindFreetype` module now provides a ``Freetype_VERSION`` result
variable. The ``FREETYPE_VERSION_STRING`` result variable is deprecated.
* The :module:`FindGettext` module now provides a ``Gettext_VERSION`` result
variable. The ``GETTEXT_VERSION_STRING`` result variable is deprecated.
* The :module:`FindGit` module now provides a ``Git_VERSION`` result
variable. The ``GIT_VERSION_STRING`` result variable is deprecated.
* The :module:`FindGnuplot` module now provides a ``Gnuplot_VERSION`` result
variable. The ``GNUPLOT_VERSION_STRING`` result variable is deprecated.
* The :module:`FindGnuTLS` module now provides a ``GnuTLS_VERSION`` result
variable. The ``GNUTLS_VERSION`` result variable is deprecated.
* The :module:`FindHg` module now provides a ``Hg_VERSION`` result
variable. The ``HG_VERSION_STRING`` result variable is deprecated.
* The :module:`FindHSPELL` module now provides a ``HSPELL_VERSION`` result
variable. The ``HSPELL_VERSION_STRING`` result variable is deprecated.
* The :module:`FindIcotool` module now provides a ``Icotool_VERSION`` result
variable. The ``ICOTOOL_VERSION_STRING`` result variable is deprecated.
* The :module:`FindImageMagick` module now provides an ``ImageMagick_VERSION``
result variable. The ``ImageMagick_VERSION_STRING`` result variable is
deprecated.
* The :module:`FindJasper` module now provides a ``Jasper_VERSION`` result
variable. The ``JASPER_VERSION_STRING`` result variable is deprecated.
* The :module:`FindLibLZMA` module now provides a ``LibLZMA_VERSION`` result
variable. The ``LIBLZMA_VERSION`` result variable is deprecated.
* The :module:`FindLibXml2` module now provides a ``LibXml2_VERSION`` result
variable. The ``LIBXML2_VERSION_STRING`` result variable is deprecated.
* The :module:`FindLibXslt` module now provides a ``LibXslt_VERSION`` result
variable. The ``LIBXSLT_VERSION_STRING`` result variable is deprecated.
* The :module:`FindLTTngUST` module now provides a ``LTTngUST_VERSION`` result
variable. The ``LTTNGUST_VERSION_STRING`` result variable is deprecated.
* The :module:`FindLua` module now provides ``Lua_VERSION``,
``Lua_VERSION_MAJOR``, ``Lua_VERSION_MINOR``, and ``Lua_VERSION_PATCH``
result variables. The ``LUA_VERSION_STRING``, ``LUA_VERSION_MAJOR``,
``LUA_VERSION_MINOR``, and ``LUA_VERSION_PATCH`` result variables are
deprecated. The :module:`FindLua51` module now similarly provides a
``Lua_VERSION`` instead of the now deprecated ``LUA_VERSION_STRING`` result
variable.
* The :module:`FindOpenCL` module now provides an ``OpenCL_VERSION`` result
variable. The ``OpenCL_VERSION_STRING`` result variable is deprecated.
* The :module:`FindOpenSceneGraph` module now provides an
``OpenSceneGraph_VERSION`` result variable. The ``OPENSCENEGRAPH_VERSION``
result variable is deprecated.
* The :module:`FindOpenSSL` module now provides an ``OpenSSL_VERSION`` result
variable. The ``OPENSSL_VERSION`` result variable is deprecated.
* The :module:`FindPerl` module now provides a ``Perl_VERSION`` result
variable. The ``PERL_VERSION_STRING`` result variable is deprecated.
* The :module:`FindPerlLibs` module now provides a ``PerlLibs_VERSION``
result variable.
* The :module:`FindPkgConfig` module now provides a ``PkgConfig_VERSION``
result variable. The ``PKG_CONFIG_VERSION_STRING`` result variable is
deprecated.
* The :module:`FindPkgConfig` module's result variable ``PKG_CONFIG_FOUND``
is deprecated in favor of ``PkgConfig_FOUND``, which is available since
CMake 3.3 and has the same value.
* The :module:`FindPNG` module now provides a ``PNG_VERSION`` result
variable. The ``PNG_VERSION_STRING`` result variable is deprecated.
* The :module:`FindPostgreSQL` module now provides a ``PostgreSQL_VERSION``
result variable. The ``PostgreSQL_VERSION_STRING`` result variable is
deprecated.
* The :module:`FindQt3` module now provides a ``Qt3_VERSION`` result
variable. The ``QT_VERSION_STRING`` result variable is deprecated.
* The :module:`FindSDL_gfx`, :module:`FindSDL_image`, :module:`FindSDL_mixer`,
:module:`FindSDL_net`, :module:`FindSDL_sound`, and :module:`FindSDL_ttf`
modules now provide their respective ``<PackageName>_VERSION`` result
variables. Previous ``<PACKAGENAME>_VERSION_STRING`` result variables
are deprecated.
* The :module:`FindSquish` module now provides a ``Squish_VERSION`` result
variable. The ``SQUISH_VERSION``, ``SQUISH_VERSION_MAJOR``,
``SQUISH_VERSION_MINOR``, and ``SQUISH_VERSION_PATCH`` result variables
are deprecated.
* The :module:`FindSubversion` module now provides a ``Subversion_VERSION``
result variable. The ``Subversion_VERSION_SVN`` result variable is
deprecated.
* The :module:`FindTclsh` module now provides a ``Tclsh_VERSION`` result
variable. The ``TCLSH_VERSION_STRING`` result variable is deprecated.
* The :module:`FindTIFF` module now provides a ``TIFF_VERSION`` result
variable. The ``TIFF_VERSION_STRING`` result variable is deprecated.
* The :module:`FindwxWidgets` module now provides a ``wxWidgets_VERSION``
result variable. The ``wxWidgets_VERSION_STRING`` result variable is
deprecated.
* Nearly all find modules now provide a ``<PackageName>_VERSION`` result
variable matching the casing of its module name. Existing variants such as
``<PackageName>_VERSION_STRING`` and uppercased ``<PACKAGENAME>_VERSION``
are deprecated. See documentation of each find module for details.
* The :module:`FindwxWidgets` module's result variable
``wxWidgets_USE_FILE`` is now deprecated in favor of including the

View File

@@ -4,14 +4,7 @@ short-object-names
* There is now the :variable:`CMAKE_INTERMEDIATE_DIR_STRATEGY` variable (and
associated environment variable :envvar:`CMAKE_INTERMEDIATE_DIR_STRATEGY`)
that may be used to change the strategy used to name intermediate
directories used for object files (and other associated target metadata). It
is supported for the following generators:
- :ref:`Ninja Generators`
- :ref:`Makefile Generators`
- :ref:`Visual Studio Generators`
Note that the strategy implementation may differ between generators.
directories used for object files (and other associated target metadata).
* There is now the :variable:`CMAKE_AUTOGEN_INTERMEDIATE_DIR_STRATEGY`
variable (and associated environment variable

View File

@@ -24,6 +24,12 @@ used.
.. note::
This only works as a cache variable, not a locally-scoped variable.
This is supported by the following generators:
- :ref:`Ninja Generators`
- :ref:`Makefile Generators`
- :ref:`Visual Studio Generators`
.. note::
Not all generators support all strategies and paths may differ between
generators.

View File

@@ -602,9 +602,8 @@ class cmMakefile;
"consistent.", \
4, 2, 0, WARN) \
SELECT(POLICY, CMP0201, \
"The Python::NumPy target does not depend on the Python::Module " \
"target.", \
4, 2, 0, WARN) \
"Python::NumPy does not depend on Python::Development.Module.", 4, \
2, 0, WARN) \
SELECT(POLICY, CMP0202, \
"PDB file names always include their target's per-config POSTFIX.", \
4, 2, 0, WARN) \