Help: Mark up references to NEW and OLD policy settings properly.
This commit is contained in:
parent
6c02e7f427
commit
a0fa025377
@ -15,15 +15,15 @@ across multiple releases. When a new policy is introduced, newer CMake
|
|||||||
versions will begin to warn about the backward compatible behavior. It
|
versions will begin to warn about the backward compatible behavior. It
|
||||||
is possible to disable the warning by explicitly requesting the OLD, or
|
is possible to disable the warning by explicitly requesting the OLD, or
|
||||||
backward compatible behavior using the :command:`cmake_policy` command.
|
backward compatible behavior using the :command:`cmake_policy` command.
|
||||||
It is also possible to request NEW, or non-backward compatible behavior
|
It is also possible to request ``NEW``, or non-backward compatible behavior
|
||||||
for a policy, also avoiding the warning. Each policy can also be set to
|
for a policy, also avoiding the warning. Each policy can also be set to
|
||||||
either NEW or OLD behavior explicitly on the command line with the
|
either ``NEW`` or ``OLD`` behavior explicitly on the command line with the
|
||||||
:variable:`CMAKE_POLICY_DEFAULT_CMP<NNNN>` variable.
|
:variable:`CMAKE_POLICY_DEFAULT_CMP<NNNN>` variable.
|
||||||
|
|
||||||
The :command:`cmake_minimum_required` command does more than report an
|
The :command:`cmake_minimum_required` command does more than report an
|
||||||
error if a too-old version of CMake is used to build a project. It
|
error if a too-old version of CMake is used to build a project. It
|
||||||
also sets all policies introduced in that CMake version or earlier to
|
also sets all policies introduced in that CMake version or earlier to
|
||||||
NEW behavior. To manage policies without increasing the minimum required
|
``NEW`` behavior. To manage policies without increasing the minimum required
|
||||||
CMake version, the :command:`if(POLICY)` command may be used:
|
CMake version, the :command:`if(POLICY)` command may be used:
|
||||||
|
|
||||||
.. code-block:: cmake
|
.. code-block:: cmake
|
||||||
@ -32,7 +32,7 @@ CMake version, the :command:`if(POLICY)` command may be used:
|
|||||||
cmake_policy(SET CMP0990 NEW)
|
cmake_policy(SET CMP0990 NEW)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
This has the effect of using the NEW behavior with newer CMake releases which
|
This has the effect of using the ``NEW`` behavior with newer CMake releases which
|
||||||
users may be using and not issuing a compatibility warning.
|
users may be using and not issuing a compatibility warning.
|
||||||
|
|
||||||
The setting of a policy is confined in some cases to not propagate to the
|
The setting of a policy is confined in some cases to not propagate to the
|
||||||
|
Loading…
x
Reference in New Issue
Block a user