diff options
161 files changed, 604 insertions, 622 deletions
diff --git a/Help/policy/CMP0001.rst b/Help/policy/CMP0001.rst index 6fa64d9..e06f2a1 100644 --- a/Help/policy/CMP0001.rst +++ b/Help/policy/CMP0001.rst @@ -14,8 +14,8 @@ and the :command:`cmake_policy` command. However, CMake must still check ``CMAKE_BACKWARDS_COMPATIBILITY`` for projects written for CMake 2.4 and below. -This policy was introduced in CMake version 2.6.0. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. Use -the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 2.6.0 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0002.rst b/Help/policy/CMP0002.rst index dc68d51..f50ddd5 100644 --- a/Help/policy/CMP0002.rst +++ b/Help/policy/CMP0002.rst @@ -21,8 +21,8 @@ physical name while keeping logical names distinct. Custom targets must simply have globally unique names (unless one uses the global property :prop_gbl:`ALLOW_DUPLICATE_CUSTOM_TARGETS` with a Makefiles generator). -This policy was introduced in CMake version 2.6.0. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. Use -the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 2.6.0 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0003.rst b/Help/policy/CMP0003.rst index dd90883..0a6b778 100644 --- a/Help/policy/CMP0003.rst +++ b/Help/policy/CMP0003.rst @@ -97,8 +97,8 @@ Note that the warning for this policy will be issued for at most one target. This avoids flooding users with messages for every target when setting the policy once will probably fix all targets. -This policy was introduced in CMake version 2.6.0. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. Use -the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 2.6.0 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0004.rst b/Help/policy/CMP0004.rst index be6d307..74e3e66 100644 --- a/Help/policy/CMP0004.rst +++ b/Help/policy/CMP0004.rst @@ -19,8 +19,8 @@ policy used when checking the library names is that in effect when the target is created by an :command:`add_executable` or :command:`add_library` command. -This policy was introduced in CMake version 2.6.0. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. Use -the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 2.6.0 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0005.rst b/Help/policy/CMP0005.rst index 59567d5..3037a12 100644 --- a/Help/policy/CMP0005.rst +++ b/Help/policy/CMP0005.rst @@ -19,8 +19,8 @@ generate correct escapes for all native build tools automatically. See documentation of the ``COMPILE_DEFINITIONS`` target property for limitations of the escaping implementation. -This policy was introduced in CMake version 2.6.0. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. Use -the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 2.6.0 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0006.rst b/Help/policy/CMP0006.rst index 181958b..31efebd 100644 --- a/Help/policy/CMP0006.rst +++ b/Help/policy/CMP0006.rst @@ -17,8 +17,8 @@ The ``OLD`` behavior for this policy is to fall back to the behavior for this policy is to produce an error if a bundle target is installed without a ``BUNDLE DESTINATION``. -This policy was introduced in CMake version 2.6.0. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. Use -the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 2.6.0 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0007.rst b/Help/policy/CMP0007.rst index 1006ed3..b95f36c 100644 --- a/Help/policy/CMP0007.rst +++ b/Help/policy/CMP0007.rst @@ -10,8 +10,8 @@ and not 4. The ``OLD`` behavior for this policy is to ignore empty list elements. The ``NEW`` behavior for this policy is to correctly count empty elements in a list. -This policy was introduced in CMake version 2.6.0. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. Use -the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 2.6.0 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0008.rst b/Help/policy/CMP0008.rst index 18ede82..bcb10d5 100644 --- a/Help/policy/CMP0008.rst +++ b/Help/policy/CMP0008.rst @@ -28,8 +28,8 @@ split the library name from the path and ask the linker to search for it. The ``NEW`` behavior for this policy is to trust the given path and pass it directly to the native build tool unchanged. -This policy was introduced in CMake version 2.6.1. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. Use -the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 2.6.1 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0009.rst b/Help/policy/CMP0009.rst index 27cfde0..c554522 100644 --- a/Help/policy/CMP0009.rst +++ b/Help/policy/CMP0009.rst @@ -14,8 +14,8 @@ policy is to follow the symlinks. The ``NEW`` behavior for this policy is not to follow the symlinks by default, but only if ``FOLLOW_SYMLINKS`` is given as an additional argument to the ``FILE`` command. -This policy was introduced in CMake version 2.6.2. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. Use -the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 2.6.2 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0010.rst b/Help/policy/CMP0010.rst index cfae498..442553d 100644 --- a/Help/policy/CMP0010.rst +++ b/Help/policy/CMP0010.rst @@ -13,8 +13,8 @@ The ``NEW`` behavior for this policy is to report an error. If :policy:`CMP0053` is set to ``NEW``, this policy has no effect and is treated as always being ``NEW``. -This policy was introduced in CMake version 2.6.3. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. Use -the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 2.6.3 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0011.rst b/Help/policy/CMP0011.rst index 257415c..976b3c3 100644 --- a/Help/policy/CMP0011.rst +++ b/Help/policy/CMP0011.rst @@ -18,8 +18,8 @@ compatibility. The ``OLD`` behavior for this policy is to imply The ``NEW`` behavior for this policy is to allow the commands to do their default cmake_policy ``PUSH`` and ``POP``. -This policy was introduced in CMake version 2.6.3. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. Use -the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 2.6.3 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0012.rst b/Help/policy/CMP0012.rst index 17ec8d3..dd889d2 100644 --- a/Help/policy/CMP0012.rst +++ b/Help/policy/CMP0012.rst @@ -21,8 +21,8 @@ variables named like numbers and boolean constants. The ``NEW`` behavior for this policy is to recognize numbers and boolean constants without dereferencing variables with such names. -This policy was introduced in CMake version 2.8.0. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. Use -the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 2.8.0 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0013.rst b/Help/policy/CMP0013.rst index dbd67a1..4ee19cc 100644 --- a/Help/policy/CMP0013.rst +++ b/Help/policy/CMP0013.rst @@ -14,8 +14,8 @@ this policy is to allow duplicate binary directories. The NEW behavior for this policy is to disallow duplicate binary directories with an error. -This policy was introduced in CMake version 2.8.0. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. Use -the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 2.8.0 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0014.rst b/Help/policy/CMP0014.rst index 331dde5..1487bc4 100644 --- a/Help/policy/CMP0014.rst +++ b/Help/policy/CMP0014.rst @@ -10,8 +10,8 @@ treating them as if present but empty. In CMake 2.8.0 and above this The ``OLD`` behavior for this policy is to silently ignore the problem. The ``NEW`` behavior for this policy is to report an error. -This policy was introduced in CMake version 2.8.0. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. Use -the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 2.8.0 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0015.rst b/Help/policy/CMP0015.rst index 90d5203..cd65c3f 100644 --- a/Help/policy/CMP0015.rst +++ b/Help/policy/CMP0015.rst @@ -12,8 +12,8 @@ this policy is to use relative paths verbatim in the linker command. The ``NEW`` behavior for this policy is to convert relative paths to absolute paths by appending the relative path to ``CMAKE_CURRENT_SOURCE_DIR``. -This policy was introduced in CMake version 2.8.1. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. Use -the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 2.8.1 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0016.rst b/Help/policy/CMP0016.rst index 026d02a..960361d 100644 --- a/Help/policy/CMP0016.rst +++ b/Help/policy/CMP0016.rst @@ -9,8 +9,8 @@ ignored if it was called with only one argument, and this argument wasn't a valid target. In CMake 2.8.3 and above it reports an error in this case. -This policy was introduced in CMake version 2.8.3. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. Use -the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 2.8.3 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0017.rst b/Help/policy/CMP0017.rst index ca4664e..d06ad13 100644 --- a/Help/policy/CMP0017.rst +++ b/Help/policy/CMP0017.rst @@ -14,8 +14,8 @@ precedence over the ones in the CMake module directory. The ``OLD`` behavior is to always prefer files from CMAKE_MODULE_PATH over files from the CMake modules directory. -This policy was introduced in CMake version 2.8.4. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. Use -the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 2.8.4 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0018.rst b/Help/policy/CMP0018.rst index 6248406..e4cd184 100644 --- a/Help/policy/CMP0018.rst +++ b/Help/policy/CMP0018.rst @@ -27,9 +27,8 @@ The ``NEW`` behavior for this policy is to ignore ``CMAKE_SHARED_LIBRARY_<Lang>_FLAGS`` whether it is modified or not and honor the :prop_tgt:`POSITION_INDEPENDENT_CODE` target property. -This policy was introduced in CMake version 2.8.9. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. Use -the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` -explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 2.8.9 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0019.rst b/Help/policy/CMP0019.rst index 682dcdf..f3fa46a 100644 --- a/Help/policy/CMP0019.rst +++ b/Help/policy/CMP0019.rst @@ -15,8 +15,8 @@ The ``OLD`` behavior for this policy is to re-evaluate the values for strict compatibility. The ``NEW`` behavior for this policy is to leave the values untouched. -This policy was introduced in CMake version 2.8.11. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. Use -the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 2.8.11 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0020.rst b/Help/policy/CMP0020.rst index 6d27684..0a4de5c 100644 --- a/Help/policy/CMP0020.rst +++ b/Help/policy/CMP0020.rst @@ -20,8 +20,8 @@ The ``OLD`` behavior for this policy is not to link executables to The ``NEW`` behavior for this policy is to link executables to ``qtmain.lib`` automatically when they link to QtCore ``IMPORTED`` target. -This policy was introduced in CMake version 2.8.11. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. Use -the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 2.8.11 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0021.rst b/Help/policy/CMP0021.rst index 937b106..2c49c33 100644 --- a/Help/policy/CMP0021.rst +++ b/Help/policy/CMP0021.rst @@ -14,8 +14,8 @@ in the ``INCLUDE_DIRECTORIES`` target property. The ``NEW`` behavior for this policy is to issue a ``FATAL_ERROR`` if ``INCLUDE_DIRECTORIES`` contains a relative path. -This policy was introduced in CMake version 2.8.12. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. Use -the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 2.8.12 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0022.rst b/Help/policy/CMP0022.rst index be60e37..c82a768 100644 --- a/Help/policy/CMP0022.rst +++ b/Help/policy/CMP0022.rst @@ -32,8 +32,8 @@ The ``NEW`` behavior for this policy is to use the ``INTERFACE_LINK_LIBRARIES`` property for in-build targets, and ignore the old properties matching ``(IMPORTED_)?LINK_INTERFACE_LIBRARIES(_<CONFIG>)?``. -This policy was introduced in CMake version 2.8.12. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. Use -the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 2.8.12 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0023.rst b/Help/policy/CMP0023.rst index 3c72c81..c863a91 100644 --- a/Help/policy/CMP0023.rst +++ b/Help/policy/CMP0023.rst @@ -28,8 +28,8 @@ The ``OLD`` behavior for this policy is to allow keyword and plain this policy is to not to allow mixing of the keyword and plain signatures. -This policy was introduced in CMake version 2.8.12. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. Use -the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 2.8.12 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0024.rst b/Help/policy/CMP0024.rst index 6e24b04..c9fd472 100644 --- a/Help/policy/CMP0024.rst +++ b/Help/policy/CMP0024.rst @@ -17,9 +17,8 @@ The ``OLD`` behavior for this policy is to allow including the result of an :command:`export` command. The ``NEW`` behavior for this policy is not to allow including the result of an :command:`export` command. -This policy was introduced in CMake version 3.0. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. Use -the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` -explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.0 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0025.rst b/Help/policy/CMP0025.rst index ba5e1e9..cfbed2a 100644 --- a/Help/policy/CMP0025.rst +++ b/Help/policy/CMP0025.rst @@ -18,10 +18,10 @@ to the invocation of either command. The ``OLD`` behavior for this policy is to use compiler id ``Clang``. The ``NEW`` behavior for this policy is to use compiler id ``AppleClang``. -This policy was introduced in CMake version 3.0. Use the -:command:`cmake_policy` command to set this policy to ``OLD`` or ``NEW`` -explicitly. Unlike most policies, CMake version |release| does *not* warn -by default when this policy is not set and simply uses ``OLD`` behavior. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.0 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn by default +.. include:: STANDARD_ADVICE.txt + See documentation of the :variable:`CMAKE_POLICY_WARNING_CMP0025 <CMAKE_POLICY_WARNING_CMP<NNNN>>` variable to control the warning. diff --git a/Help/policy/CMP0026.rst b/Help/policy/CMP0026.rst index e08fd54..b2a5f25 100644 --- a/Help/policy/CMP0026.rst +++ b/Help/policy/CMP0026.rst @@ -22,8 +22,8 @@ The ``OLD`` behavior for this policy is to allow reading the :prop_tgt:`LOCATION properties from build-targets. The ``NEW`` behavior for this policy is to not to allow reading the :prop_tgt:`LOCATION` properties from build-targets. -This policy was introduced in CMake version 3.0. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. Use -the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.0 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0027.rst b/Help/policy/CMP0027.rst index bf7b6a9..78c01f7 100644 --- a/Help/policy/CMP0027.rst +++ b/Help/policy/CMP0027.rst @@ -20,8 +20,8 @@ The ``NEW`` behavior of this policy is to report an error if an entry in the :prop_tgt:`INTERFACE_INCLUDE_DIRECTORIES` of a generator-expression conditionally linked ``IMPORTED`` target does not exist. -This policy was introduced in CMake version 3.0. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. Use -the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.0 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0028.rst b/Help/policy/CMP0028.rst index dcd39d8..18b17ee 100644 --- a/Help/policy/CMP0028.rst +++ b/Help/policy/CMP0028.rst @@ -20,8 +20,8 @@ disk, even if the search term contains double-colons. The ``NEW`` behavior for this policy is to issue a ``FATAL_ERROR`` if a link dependency contains double-colons but is not an ``IMPORTED`` target or an ``ALIAS`` target. -This policy was introduced in CMake version 3.0. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. Use -the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.0 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0037.rst b/Help/policy/CMP0037.rst index 9895fb0..f912a22 100644 --- a/Help/policy/CMP0037.rst +++ b/Help/policy/CMP0037.rst @@ -27,8 +27,8 @@ reserved names or which do not match the validity pattern. The ``NEW`` behavior for this policy is to report an error if an add_* command is used with an invalid target name. -This policy was introduced in CMake version 3.0. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. Use -the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.0 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0038.rst b/Help/policy/CMP0038.rst index 7fb2209..b0de8ca 100644 --- a/Help/policy/CMP0038.rst +++ b/Help/policy/CMP0038.rst @@ -11,8 +11,8 @@ The ``OLD`` behavior for this policy is to ignore targets which list themselves in their own link implementation. The ``NEW`` behavior for this policy is to report an error if a target attempts to link to itself. -This policy was introduced in CMake version 3.0. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. Use -the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.0 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0039.rst b/Help/policy/CMP0039.rst index 4b14e21..558c5c5 100644 --- a/Help/policy/CMP0039.rst +++ b/Help/policy/CMP0039.rst @@ -12,8 +12,8 @@ libraries of utility targets. The ``NEW`` behavior for this policy is to report an error if an attempt is made to set the link libraries of a utility target. -This policy was introduced in CMake version 3.0. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. Use -the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.0 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0040.rst b/Help/policy/CMP0040.rst index 0afe589..b6777ef 100644 --- a/Help/policy/CMP0040.rst +++ b/Help/policy/CMP0040.rst @@ -13,9 +13,8 @@ for unknown targets. The ``NEW`` behavior for this policy is to report an error if the target referenced in :command:`add_custom_command` is unknown or was defined outside the current directory. -This policy was introduced in CMake version 3.0. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. -Use the :command:`cmake_policy` command to set it to ``OLD`` or -``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.0 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0041.rst b/Help/policy/CMP0041.rst index 3b4df36..bf9e8a5 100644 --- a/Help/policy/CMP0041.rst +++ b/Help/policy/CMP0041.rst @@ -20,8 +20,8 @@ contain a generator expression. The ``NEW`` behavior for this policy is to repor an error if a generator expression appears in another location and the path is relative. -This policy was introduced in CMake version 3.0. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. Use -the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.0 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0042.rst b/Help/policy/CMP0042.rst index 0877564..8fb8cb2 100644 --- a/Help/policy/CMP0042.rst +++ b/Help/policy/CMP0042.rst @@ -14,8 +14,8 @@ wanting ``@rpath`` in a target's install name may remove any setting of the :prop_tgt:`INSTALL_NAME_DIR` and :variable:`CMAKE_INSTALL_NAME_DIR` variables. -This policy was introduced in CMake version 3.0. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. Use -the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.0 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0043.rst b/Help/policy/CMP0043.rst index 05210ac..decd228 100644 --- a/Help/policy/CMP0043.rst +++ b/Help/policy/CMP0043.rst @@ -40,8 +40,8 @@ The ``OLD`` behavior for this policy is to consume the content of the suffixed compilation command. The ``NEW`` behavior for this policy is to ignore the content of the :prop_tgt:`COMPILE_DEFINITIONS_<CONFIG>` target property . -This policy was introduced in CMake version 3.0. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. Use -the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.0 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0044.rst b/Help/policy/CMP0044.rst index 6a4d040..36c2839 100644 --- a/Help/policy/CMP0044.rst +++ b/Help/policy/CMP0044.rst @@ -14,8 +14,8 @@ with the value in the ``<LANG>_COMPILER_ID`` expression. The ``NEW`` behavior for this policy is to perform a case-sensitive comparison with the value in the ``<LANG>_COMPILER_ID`` expression. -This policy was introduced in CMake version 3.0. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. Use -the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.0 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0045.rst b/Help/policy/CMP0045.rst index 80e217b..257abfa 100644 --- a/Help/policy/CMP0045.rst +++ b/Help/policy/CMP0045.rst @@ -12,8 +12,8 @@ variable to a ``-NOTFOUND`` value. The ``NEW`` behavior for this policy is to issue a ``FATAL_ERROR`` if the command is called with a non-existent target. -This policy was introduced in CMake version 3.0. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. Use -the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.0 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0046.rst b/Help/policy/CMP0046.rst index bf78584..6e9bc72 100644 --- a/Help/policy/CMP0046.rst +++ b/Help/policy/CMP0046.rst @@ -11,9 +11,8 @@ dependencies. The ``NEW`` behavior for this policy is to report an error if non-existent dependencies are listed in the :command:`add_dependencies` command. -This policy was introduced in CMake version 3.0. -CMake version |release| warns when the policy is not set and uses -``OLD`` behavior. Use the :command:`cmake_policy` command to set it -to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.0 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0047.rst b/Help/policy/CMP0047.rst index 9588edd..e82d72c 100644 --- a/Help/policy/CMP0047.rst +++ b/Help/policy/CMP0047.rst @@ -19,10 +19,10 @@ The ``OLD`` behavior for this policy is to use the ``GNU`` compiler id for the qcc and QCC compiler drivers. The ``NEW`` behavior for this policy is to use the ``QCC`` compiler id for those drivers. -This policy was introduced in CMake version 3.0. Use the -:command:`cmake_policy` command to set this policy to ``OLD`` or ``NEW`` -explicitly. Unlike most policies, CMake version |release| does *not* warn -by default when this policy is not set and simply uses ``OLD`` behavior. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.0 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn by default +.. include:: STANDARD_ADVICE.txt + See documentation of the :variable:`CMAKE_POLICY_WARNING_CMP0047 <CMAKE_POLICY_WARNING_CMP<NNNN>>` variable to control the warning. diff --git a/Help/policy/CMP0048.rst b/Help/policy/CMP0048.rst index e63ec01..6192136 100644 --- a/Help/policy/CMP0048.rst +++ b/Help/policy/CMP0048.rst @@ -16,9 +16,8 @@ The ``OLD`` behavior for this policy is to leave ``VERSION`` variables untouched The ``NEW`` behavior for this policy is to set ``VERSION`` as documented by the :command:`project` command. -This policy was introduced in CMake version 3.0. -CMake version |release| warns when the policy is not set and uses -``OLD`` behavior. Use the :command:`cmake_policy` command to set -it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.0 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0049.rst b/Help/policy/CMP0049.rst index 49b20be..d12ef88 100644 --- a/Help/policy/CMP0049.rst +++ b/Help/policy/CMP0049.rst @@ -17,9 +17,8 @@ The ``OLD`` behavior for this policy is to expand such variables when processing the target sources. The ``NEW`` behavior for this policy is to issue an error if such variables need to be expanded. -This policy was introduced in CMake version 3.0. -CMake version |release| warns when the policy is not set and uses -``OLD`` behavior. Use the :command:`cmake_policy` command to set -it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.0 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0050.rst b/Help/policy/CMP0050.rst index 27e7b1d..1b93773 100644 --- a/Help/policy/CMP0050.rst +++ b/Help/policy/CMP0050.rst @@ -12,9 +12,8 @@ The ``OLD`` behavior for this policy is to allow the use of :command:`add_custom_command` SOURCE signatures. The ``NEW`` behavior for this policy is to issue an error if such a signature is used. -This policy was introduced in CMake version 3.0. -CMake version |release| warns when the policy is not set and uses -``OLD`` behavior. Use the :command:`cmake_policy` command to set it to ``OLD`` or -``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.0 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0051.rst b/Help/policy/CMP0051.rst index 3558909..e049bba 100644 --- a/Help/policy/CMP0051.rst +++ b/Help/policy/CMP0051.rst @@ -20,9 +20,8 @@ expressions from the :prop_tgt:`SOURCES` target property. The ``NEW`` behavior for this policy is to include ``TARGET_OBJECTS`` expressions in the output. -This policy was introduced in CMake version 3.1. -CMake version |release| warns when the policy is not set and uses -``OLD`` behavior. Use the :command:`cmake_policy` command to set it -to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.1 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0052.rst b/Help/policy/CMP0052.rst index c75f9ab..c710262 100644 --- a/Help/policy/CMP0052.rst +++ b/Help/policy/CMP0052.rst @@ -21,9 +21,8 @@ The ``OLD`` behavior for this policy is to export the content of the directory. The ``NEW`` behavior for this policy is to issue an error if such a directory is used. -This policy was introduced in CMake version 3.1. -CMake version |release| warns when the policy is not set and uses -``OLD`` behavior. Use the :command:`cmake_policy` command to set it -to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.1 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0053.rst b/Help/policy/CMP0053.rst index 58500d6..5a6f5cf 100644 --- a/Help/policy/CMP0053.rst +++ b/Help/policy/CMP0053.rst @@ -44,9 +44,8 @@ The ``OLD`` behavior for this policy is to honor the legacy behavior for variable references and escape sequences. The ``NEW`` behavior is to use the simpler variable expansion and escape sequence evaluation rules. -This policy was introduced in CMake version 3.1. -CMake version |release| warns when the policy is not set and uses -``OLD`` behavior. Use the :command:`cmake_policy` command to set -it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.1 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0054.rst b/Help/policy/CMP0054.rst index c7ae019..d22e8d9 100644 --- a/Help/policy/CMP0054.rst +++ b/Help/policy/CMP0054.rst @@ -46,9 +46,8 @@ further dereferenced: if("E" STREQUAL "") -This policy was introduced in CMake version 3.1. -CMake version |release| warns when the policy is not set and uses -``OLD`` behavior. Use the :command:`cmake_policy` command to set -it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.1 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0055.rst b/Help/policy/CMP0055.rst index 47cac8e..dc83863 100644 --- a/Help/policy/CMP0055.rst +++ b/Help/policy/CMP0055.rst @@ -13,9 +13,8 @@ The ``OLD`` behavior for this policy is to allow :command:`break` to be placed outside of loop contexts and ignores any arguments. The ``NEW`` behavior for this policy is to issue an error if a misplaced break or any arguments are found. -This policy was introduced in CMake version 3.2. -CMake version |release| warns when the policy is not set and uses -``OLD`` behavior. Use the :command:`cmake_policy` command to set it to ``OLD`` or -``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.2 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0056.rst b/Help/policy/CMP0056.rst index 628a6a1..ca238e2 100644 --- a/Help/policy/CMP0056.rst +++ b/Help/policy/CMP0056.rst @@ -27,9 +27,11 @@ set it on the command line by defining the :variable:`CMAKE_POLICY_DEFAULT_CMP0056 <CMAKE_POLICY_DEFAULT_CMP<NNNN>>` variable in the cache. -This policy was introduced in CMake version 3.2. Unlike most policies, -CMake version |release| does *not* warn by default when this policy -is not set and simply uses ``OLD`` behavior. See documentation of the +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.2 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn by default +.. include:: STANDARD_ADVICE.txt + +See documentation of the :variable:`CMAKE_POLICY_WARNING_CMP0056 <CMAKE_POLICY_WARNING_CMP<NNNN>>` variable to control the warning. diff --git a/Help/policy/CMP0057.rst b/Help/policy/CMP0057.rst index 76aebfb..07bc969 100644 --- a/Help/policy/CMP0057.rst +++ b/Help/policy/CMP0057.rst @@ -10,9 +10,8 @@ CMake 3.3 adds support for the new IN_LIST operator. The ``OLD`` behavior for this policy is to ignore the IN_LIST operator. The ``NEW`` behavior is to interpret the IN_LIST operator. -This policy was introduced in CMake version 3.3. -CMake version |release| warns when the policy is not set and uses -``OLD`` behavior. Use the :command:`cmake_policy` command to set -it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.3 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0058.rst b/Help/policy/CMP0058.rst index faab1cb..2b729e0 100644 --- a/Help/policy/CMP0058.rst +++ b/Help/policy/CMP0058.rst @@ -104,12 +104,12 @@ rules for unknown dependencies in the build tree. The ``NEW`` behavior for this policy is to not generate these and instead require projects to specify custom command ``BYPRODUCTS`` explicitly. -This policy was introduced in CMake version 3.3. -CMake version |release| warns when it sees unknown dependencies in -out-of-source build trees if the policy is not set and then uses -``OLD`` behavior. Use the :command:`cmake_policy` command to set -the policy to ``OLD`` or ``NEW`` explicitly. The policy setting -must be in scope at the end of the top-level ``CMakeLists.txt`` -file of the project and has global effect. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.3 +.. |WARNS_OR_DOES_NOT_WARN| replace:: + warns when it sees unknown dependencies in out-of-source build trees +.. include:: STANDARD_ADVICE.txt + +The policy setting must be in scope at the end of the top-level +``CMakeLists.txt`` file of the project and has global effect. .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0059.rst b/Help/policy/CMP0059.rst index 6317d05..4ac286d 100644 --- a/Help/policy/CMP0059.rst +++ b/Help/policy/CMP0059.rst @@ -13,9 +13,8 @@ The ``OLD`` behavior for this policy is to provide the list of flags given so far to the :command:`add_definitions` command. The ``NEW`` behavior is to behave as a normal user-defined directory property. -This policy was introduced in CMake version 3.3. -CMake version |release| warns when the policy is not set and uses -``OLD`` behavior. Use the :command:`cmake_policy` command to set -it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.3 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0060.rst b/Help/policy/CMP0060.rst index 09257d1..8fff803 100644 --- a/Help/policy/CMP0060.rst +++ b/Help/policy/CMP0060.rst @@ -58,9 +58,11 @@ libraries whose full paths are known to be in implicit link directories. The ``NEW`` behavior for this policy is to link libraries by full path even if they are in implicit link directories. -This policy was introduced in CMake version 3.3. Unlike most policies, -CMake version |release| does *not* warn by default when this policy -is not set and simply uses ``OLD`` behavior. See documentation of the +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.3 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn by default +.. include:: STANDARD_ADVICE.txt + +See documentation of the :variable:`CMAKE_POLICY_WARNING_CMP0060 <CMAKE_POLICY_WARNING_CMP<NNNN>>` variable to control the warning. diff --git a/Help/policy/CMP0061.rst b/Help/policy/CMP0061.rst index aca551d..22ec0d0 100644 --- a/Help/policy/CMP0061.rst +++ b/Help/policy/CMP0061.rst @@ -21,8 +21,8 @@ The ``OLD`` behavior for this policy is to add ``-i`` to ``make`` calls in CTest. The ``NEW`` behavior for this policy is to not add ``-i``. -This policy was introduced in CMake version 3.3. Unlike most policies, -CMake version |release| does *not* warn when this policy is not set and -simply uses ``OLD`` behavior. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.3 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0062.rst b/Help/policy/CMP0062.rst index 01e93f0..e0cf71b 100644 --- a/Help/policy/CMP0062.rst +++ b/Help/policy/CMP0062.rst @@ -23,9 +23,8 @@ The ``OLD`` behavior for this policy is to allow installing the result of an :command:`export()` command. The ``NEW`` behavior for this policy is not to allow installing the result of an :command:`export()` command. -This policy was introduced in CMake version 3.3. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. Use -the :command:`cmake_policy()` command to set it to ``OLD`` or ``NEW`` -explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.3 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0063.rst b/Help/policy/CMP0063.rst index fec3ad8..1e1cbfa 100644 --- a/Help/policy/CMP0063.rst +++ b/Help/policy/CMP0063.rst @@ -22,9 +22,8 @@ for static libraries, object libraries, and executables without exports. The ``NEW`` behavior for this policy is to honor the visibility properties for all target types. -This policy was introduced in CMake version 3.3. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. Use -the :command:`cmake_policy()` command to set it to ``OLD`` or ``NEW`` -explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.3 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0064.rst b/Help/policy/CMP0064.rst index 0c20c13..4fd873f 100644 --- a/Help/policy/CMP0064.rst +++ b/Help/policy/CMP0064.rst @@ -11,9 +11,8 @@ given test name was created by the :command:`add_test` command. The ``OLD`` behavior for this policy is to ignore the ``TEST`` operator. The ``NEW`` behavior is to interpret the ``TEST`` operator. -This policy was introduced in CMake version 3.4. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. Use -the :command:`cmake_policy()` command to set it to ``OLD`` or ``NEW`` -explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.4 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0065.rst b/Help/policy/CMP0065.rst index 8968b91..54034b1 100644 --- a/Help/policy/CMP0065.rst +++ b/Help/policy/CMP0065.rst @@ -20,9 +20,11 @@ The ``NEW`` behavior of this policy is to only use the additional link flags when linking executables if the :prop_tgt:`ENABLE_EXPORTS` target property is set to ``True``. -This policy was introduced in CMake version 3.4. Unlike most policies, -CMake version |release| does *not* warn by default when this policy -is not set and simply uses ``OLD`` behavior. See documentation of the +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.4 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn by default +.. include:: STANDARD_ADVICE.txt + +See documentation of the :variable:`CMAKE_POLICY_WARNING_CMP0065 <CMAKE_POLICY_WARNING_CMP<NNNN>>` variable to control the warning. diff --git a/Help/policy/CMP0066.rst b/Help/policy/CMP0066.rst index b08430f..fa4bc5c 100644 --- a/Help/policy/CMP0066.rst +++ b/Help/policy/CMP0066.rst @@ -20,9 +20,11 @@ built-in defaults for the current compiler and platform. The ``NEW`` behavior of this policy is to honor config-specific flag variabldes like :variable:`CMAKE_<LANG>_FLAGS_DEBUG`. -This policy was introduced in CMake version 3.7. Unlike most policies, -CMake version |release| does *not* warn by default when this policy -is not set and simply uses ``OLD`` behavior. See documentation of the +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.7 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn by default +.. include:: STANDARD_ADVICE.txt + +See documentation of the :variable:`CMAKE_POLICY_WARNING_CMP0066 <CMAKE_POLICY_WARNING_CMP<NNNN>>` variable to control the warning. diff --git a/Help/policy/CMP0067.rst b/Help/policy/CMP0067.rst index 8358bb2..0696131 100644 --- a/Help/policy/CMP0067.rst +++ b/Help/policy/CMP0067.rst @@ -30,9 +30,11 @@ setting variables when generating the ``try_compile`` test project. The ``NEW`` behavior of this policy is to honor language standard setting variables. -This policy was introduced in CMake version 3.8. Unlike most policies, -CMake version |release| does *not* warn by default when this policy -is not set and simply uses ``OLD`` behavior. See documentation of the +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.8 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn by default +.. include:: STANDARD_ADVICE.txt + +See documentation of the :variable:`CMAKE_POLICY_WARNING_CMP0067 <CMAKE_POLICY_WARNING_CMP<NNNN>>` variable to control the warning. diff --git a/Help/policy/CMP0068.rst b/Help/policy/CMP0068.rst index 5d2a4b1..aad8c3a 100644 --- a/Help/policy/CMP0068.rst +++ b/Help/policy/CMP0068.rst @@ -29,9 +29,8 @@ The ``OLD`` behavior of this policy is to use the ``RPATH`` settings for ``install_name`` on macOS. The ``NEW`` behavior of this policy is to ignore the ``RPATH`` settings for ``install_name`` on macOS. -This policy was introduced in CMake version 3.9. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. -Use the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` -explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.9 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0069.rst b/Help/policy/CMP0069.rst index eafac45..97665e6 100644 --- a/Help/policy/CMP0069.rst +++ b/Help/policy/CMP0069.rst @@ -26,10 +26,9 @@ behavior for this policy is to add IPO flags only for Intel compiler on Linux. The ``NEW`` behavior for this policy is to add IPO flags for the current compiler or produce an error if CMake does not know the flags. -This policy was introduced in CMake version 3.9. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. -Use the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` -explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.9 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0070.rst b/Help/policy/CMP0070.rst index c880d1f..33b5a97 100644 --- a/Help/policy/CMP0070.rst +++ b/Help/policy/CMP0070.rst @@ -19,9 +19,8 @@ working directory of CMake. The ``NEW`` behavior for this policy is to interpret relative paths with respect to the current source or binary directory of the caller. -This policy was introduced in CMake version 3.10. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. -Use the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` -explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.10 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0071.rst b/Help/policy/CMP0071.rst index 700d3b0..7e118ee 100644 --- a/Help/policy/CMP0071.rst +++ b/Help/policy/CMP0071.rst @@ -36,9 +36,8 @@ Source skip example:: set_property(SOURCE /path/to/file3.h PROPERTY SKIP_AUTOGEN ON) # ... -This policy was introduced in CMake version 3.10. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. -Use the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` -explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.10 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0072.rst b/Help/policy/CMP0072.rst index 1dcdfef..430cb5a 100644 --- a/Help/policy/CMP0072.rst +++ b/Help/policy/CMP0072.rst @@ -20,9 +20,8 @@ The ``OLD`` behavior for this policy is to set ``OpenGL_GL_PREFERENCE`` to ``LEGACY``. The ``NEW`` behavior for this policy is to set ``OpenGL_GL_PREFERENCE`` to ``GLVND``. -This policy was introduced in CMake version 3.11. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. -Use the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` -explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.11 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0073.rst b/Help/policy/CMP0073.rst index 8f0345c..897092e 100644 --- a/Help/policy/CMP0073.rst +++ b/Help/policy/CMP0073.rst @@ -19,9 +19,8 @@ not been updated to avoid using them. The ``OLD`` behavior for this policy is to set ``<tgt>_LIB_DEPENDS`` cache entries. The ``NEW`` behavior for this policy is to not set them. -This policy was introduced in CMake version 3.12. Use the -:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. -Unlike most policies, CMake version |release| does *not* warn -when this policy is not set and simply uses ``OLD`` behavior. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.12 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0074.rst b/Help/policy/CMP0074.rst index 863bbb2..fff843f 100644 --- a/Help/policy/CMP0074.rst +++ b/Help/policy/CMP0074.rst @@ -17,9 +17,8 @@ The ``OLD`` behavior for this policy is to ignore ``<PackageName>_ROOT`` variables. The ``NEW`` behavior for this policy is to use ``<PackageName>_ROOT`` variables. -This policy was introduced in CMake version 3.12. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. -Use the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` -explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.12 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0075.rst b/Help/policy/CMP0075.rst index 4213782..479c629 100644 --- a/Help/policy/CMP0075.rst +++ b/Help/policy/CMP0075.rst @@ -20,9 +20,8 @@ The ``OLD`` behavior for this policy is to ignore ``CMAKE_REQUIRED_LIBRARIES`` in the include file check macros. The ``NEW`` behavior of this policy is to honor ``CMAKE_REQUIRED_LIBRARIES`` in the include file check macros. -This policy was introduced in CMake version 3.12. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. -Use the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` -explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.12 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0076.rst b/Help/policy/CMP0076.rst index edca742..a30b4c9 100644 --- a/Help/policy/CMP0076.rst +++ b/Help/policy/CMP0076.rst @@ -20,9 +20,8 @@ to expect this behavior. The ``OLD`` behavior for this policy is to leave all relative source file paths unmodified. The ``NEW`` behavior of this policy is to convert relative paths to absolute according to above rules. -This policy was introduced in CMake version 3.13. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. -Use the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` -explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.13 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0077.rst b/Help/policy/CMP0077.rst index 482125a..f64f92f 100644 --- a/Help/policy/CMP0077.rst +++ b/Help/policy/CMP0077.rst @@ -50,10 +50,11 @@ See :policy:`CMP0126` for a similar policy for the :command:`set(CACHE)` command, but note that there are some differences in ``NEW`` behavior between the two policies. -This policy was introduced in CMake version 3.13. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. -Use the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` -explicitly within a project. Use the :variable:`CMAKE_POLICY_DEFAULT_CMP0077 +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.13 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt + +Use the :variable:`CMAKE_POLICY_DEFAULT_CMP0077 <CMAKE_POLICY_DEFAULT_CMP\<NNNN\>>` variable to set the policy for a third-party project in a subdirectory without modifying it. diff --git a/Help/policy/CMP0078.rst b/Help/policy/CMP0078.rst index 89fdb0b..c4b8a64 100644 --- a/Help/policy/CMP0078.rst +++ b/Help/policy/CMP0078.rst @@ -18,9 +18,8 @@ explicit preference. The value may be one of: This is the default if not specified. * ``STANDARD``: target name matches specified name. -This policy was introduced in CMake version 3.13. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. -Use the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` -explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.13 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0079.rst b/Help/policy/CMP0079.rst index 01aa08d..039ac7b 100644 --- a/Help/policy/CMP0079.rst +++ b/Help/policy/CMP0079.rst @@ -34,9 +34,8 @@ except in the previously accidentally allowed case of using the ``INTERFACE`` keyword only. The ``NEW`` behavior of this policy is to allow all such calls but use the new scoping rules. -This policy was introduced in CMake version 3.13. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. -Use the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` -explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.13 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0080.rst b/Help/policy/CMP0080.rst index 789efea..cface96 100644 --- a/Help/policy/CMP0080.rst +++ b/Help/policy/CMP0080.rst @@ -19,9 +19,8 @@ The ``OLD`` behavior of this policy is to allow :module:`BundleUtilities` to be included at configure time. The ``NEW`` behavior of this policy is to disallow such inclusion. -This policy was introduced in CMake version 3.13. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. -Use the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` -explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.13 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0081.rst b/Help/policy/CMP0081.rst index d1573dd..b89a353 100644 --- a/Help/policy/CMP0081.rst +++ b/Help/policy/CMP0081.rst @@ -17,8 +17,8 @@ in the :prop_tgt:`LINK_DIRECTORIES` target property. The ``NEW`` behavior for this policy is to issue a ``FATAL_ERROR`` if :prop_tgt:`LINK_DIRECTORIES` contains a relative path. -This policy was introduced in CMake version 3.13. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. Use -the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.13 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0082.rst b/Help/policy/CMP0082.rst index 25c9580..2de0cd9 100644 --- a/Help/policy/CMP0082.rst +++ b/Help/policy/CMP0082.rst @@ -19,9 +19,11 @@ The ``OLD`` behavior for this policy is to run the install rules from behavior for this policy is to run all install rules in the order they are declared. -This policy was introduced in CMake version 3.14. Unlike most policies, -CMake version |release| does *not* warn by default when this policy -is not set and simply uses ``OLD`` behavior. See documentation of the +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.14 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn by default +.. include:: STANDARD_ADVICE.txt + +See documentation of the :variable:`CMAKE_POLICY_WARNING_CMP0082 <CMAKE_POLICY_WARNING_CMP<NNNN>>` variable to control the warning. diff --git a/Help/policy/CMP0083.rst b/Help/policy/CMP0083.rst index 7518ee3..2ba9e14 100644 --- a/Help/policy/CMP0083.rst +++ b/Help/policy/CMP0083.rst @@ -25,10 +25,9 @@ which it is used, it is the project's responsibility to use the :prop_tgt:`POSITION_INDEPENDENT_CODE` target property for executables will be honored at link time. -This policy was introduced in CMake version 3.14. Use the -:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. -Unlike most policies, CMake version |release| does not warn when this policy is -not set and simply uses ``OLD`` behavior. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.14 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn +.. include:: STANDARD_ADVICE.txt .. Note:: diff --git a/Help/policy/CMP0084.rst b/Help/policy/CMP0084.rst index 9547701..3b86a73 100644 --- a/Help/policy/CMP0084.rst +++ b/Help/policy/CMP0084.rst @@ -20,9 +20,8 @@ The ``OLD`` behavior of this policy is for :module:`FindQt` to exist for :command:`find_package`. The ``NEW`` behavior is to pretend that it doesn't exist for :command:`find_package`. -This policy was introduced in CMake version 3.14. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. -Use the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` -explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.14 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0085.rst b/Help/policy/CMP0085.rst index d90c72f..783c644 100644 --- a/Help/policy/CMP0085.rst +++ b/Help/policy/CMP0085.rst @@ -15,9 +15,8 @@ The ``OLD`` behavior of this policy is for ``$<IN_LIST:...>`` to always return ``0`` if the first argument is empty. The ``NEW`` behavior is to return ``1`` if the first argument is empty and the list contains an empty item. -This policy was introduced in CMake version 3.14. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. -Use the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` -explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.14 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0086.rst b/Help/policy/CMP0086.rst index 725b502..c1abffe 100644 --- a/Help/policy/CMP0086.rst +++ b/Help/policy/CMP0086.rst @@ -14,9 +14,8 @@ The ``OLD`` behavior for this policy is to never pass ``-module`` option. The ``NEW`` behavior is to pass ``-module`` option to ``SWIG`` compiler if ``SWIG_MODULE_NAME`` is specified. -This policy was introduced in CMake version 3.14. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. -Use the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` -explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.14 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0087.rst b/Help/policy/CMP0087.rst index 4a65506..3ef2c60 100644 --- a/Help/policy/CMP0087.rst +++ b/Help/policy/CMP0087.rst @@ -23,9 +23,8 @@ for calling these commands from places that have their own policy scope but not their own directory scope (e.g. from files brought in via :command:`include()` rather than :command:`add_subdirectory()`). -This policy was introduced in CMake version 3.14. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. -Use the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` -explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.14 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0088.rst b/Help/policy/CMP0088.rst index 1840a58..e53078c 100644 --- a/Help/policy/CMP0088.rst +++ b/Help/policy/CMP0088.rst @@ -23,9 +23,8 @@ to generate implicit files. The ``NEW`` behavior of this policy is to use the current binary directory for the ``WORKING_DIRECTORY`` and where to generate implicit files. -This policy was introduced in CMake version 3.14. Use the -:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. -Unlike most policies, CMake version |release| does *not* warn -when this policy is not set and simply uses ``OLD`` behavior. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.14 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0089.rst b/Help/policy/CMP0089.rst index e3fc77a..5f548c0 100644 --- a/Help/policy/CMP0089.rst +++ b/Help/policy/CMP0089.rst @@ -21,10 +21,10 @@ to the invocation of either command. The ``OLD`` behavior for this policy is to use compiler id ``XL``. The ``NEW`` behavior for this policy is to use compiler id ``XLClang``. -This policy was introduced in CMake version 3.15. Use the -:command:`cmake_policy` command to set this policy to ``OLD`` or ``NEW`` explicitly. -Unlike most policies, CMake version |release| does *not* warn -by default when this policy is not set and simply uses ``OLD`` behavior. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.15 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn by default +.. include:: STANDARD_ADVICE.txt + See documentation of the :variable:`CMAKE_POLICY_WARNING_CMP0089 <CMAKE_POLICY_WARNING_CMP<NNNN>>` variable to control the warning. diff --git a/Help/policy/CMP0090.rst b/Help/policy/CMP0090.rst index 58dd999..df7726c 100644 --- a/Help/policy/CMP0090.rst +++ b/Help/policy/CMP0090.rst @@ -21,9 +21,8 @@ to populate the user package registry unless The ``NEW`` behavior is for :command:`export(PACKAGE)` command to do nothing unless the :variable:`CMAKE_EXPORT_PACKAGE_REGISTRY` is enabled. -This policy was introduced in CMake version 3.15. Use the -:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. -Unlike most policies, CMake version |release| does *not* warn -when this policy is not set and simply uses ``OLD`` behavior. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.15 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0091.rst b/Help/policy/CMP0091.rst index ffc0ade..110e655 100644 --- a/Help/policy/CMP0091.rst +++ b/Help/policy/CMP0091.rst @@ -43,9 +43,8 @@ entries and ignore the :variable:`CMAKE_MSVC_RUNTIME_LIBRARY` abstraction. The ``NEW`` behavior for this policy is to *not* place MSVC runtime library flags in the default cache entries and use the abstraction instead. -This policy was introduced in CMake version 3.15. Use the -:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. -Unlike many policies, CMake version |release| does *not* warn -when this policy is not set and simply uses ``OLD`` behavior. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.15 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0092.rst b/Help/policy/CMP0092.rst index 2f39830..03a9975 100644 --- a/Help/policy/CMP0092.rst +++ b/Help/policy/CMP0092.rst @@ -32,9 +32,8 @@ default :variable:`CMAKE_<LANG>_FLAGS` cache entries. The ``NEW`` behavior for this policy is to *not* place MSVC warning flags in the default cache entries. -This policy was introduced in CMake version 3.15. Use the -:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. -Unlike many policies, CMake version |release| does *not* warn -when this policy is not set and simply uses ``OLD`` behavior. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.15 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0093.rst b/Help/policy/CMP0093.rst index 4a9955f..5f7ae7d 100644 --- a/Help/policy/CMP0093.rst +++ b/Help/policy/CMP0093.rst @@ -18,9 +18,8 @@ The ``OLD`` behavior for this policy is for :module:`FindBoost` to report policy is for :module:`FindBoost` to report ``Boost_VERSION`` in ``x.y.z`` format. -This policy was introduced in CMake version 3.15. Use the -:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. -Unlike many policies, CMake version |release| does *not* warn -when this policy is not set and simply uses the ``OLD`` behavior. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.15 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0094.rst b/Help/policy/CMP0094.rst index 1b57658..1b88a22 100644 --- a/Help/policy/CMP0094.rst +++ b/Help/policy/CMP0094.rst @@ -16,9 +16,8 @@ The ``OLD`` behavior for this policy set value ``VERSION`` for variables ``Python3_FIND_STRATEGY``, ``Python2_FIND_STRATEGY`` and ``Python_FIND_STRATEGY``. -This policy was introduced in CMake version 3.15. Use the -:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. -Unlike many policies, CMake version |release| does *not* warn -when this policy is not set and simply uses the ``OLD`` behavior. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.15 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0095.rst b/Help/policy/CMP0095.rst index ebdbab6..cbeffc7 100644 --- a/Help/policy/CMP0095.rst +++ b/Help/policy/CMP0095.rst @@ -24,9 +24,9 @@ intermediary ``cmake_install.cmake`` script. The ``NEW`` behavior is to properly escape coincidental CMake syntax in ``RPATH`` entries when generating the intermediary ``cmake_install.cmake`` script. -This policy was introduced in CMake version 3.16. CMake version |release| warns -when the policy is not set and detected usage of CMake-like syntax and uses -``OLD`` behavior. Use the :command:`cmake_policy` command to set it to ``OLD`` -or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.16 +.. |WARNS_OR_DOES_NOT_WARN| replace:: + warns when it detects use of CMake-like syntax +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0096.rst b/Help/policy/CMP0096.rst index 8fd6f72..8ea3784 100644 --- a/Help/policy/CMP0096.rst +++ b/Help/policy/CMP0096.rst @@ -19,9 +19,8 @@ e.g. such that version ``1.07.06`` becomes ``1.7.6``. The ``NEW`` behavior of this policy preserves the leading zeros in all components, such that version ``1.07.06`` remains unchanged. -This policy was introduced in CMake version 3.16. Unlike many policies, CMake -version |release| does *not* warn when this policy is not set and simply uses -the ``OLD`` behavior. Use the :command:`cmake_policy` command to set it to -``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.16 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0097.rst b/Help/policy/CMP0097.rst index 24957d0..66a7b96 100644 --- a/Help/policy/CMP0097.rst +++ b/Help/policy/CMP0097.rst @@ -21,7 +21,8 @@ an empty string to initialize and update all git submodules. The ``NEW`` behavior for this policy is for ``GIT_SUBMODULES`` when set to an empty string to initialize and update no git submodules. -This policy was introduced in CMake version 3.16. Use the -:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. -Unlike most policies, CMake version |release| does *not* warn -when this policy is not set and simply uses ``OLD`` behavior. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.16 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn +.. include:: STANDARD_ADVICE.txt + +.. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0098.rst b/Help/policy/CMP0098.rst index e793380..42c900b 100644 --- a/Help/policy/CMP0098.rst +++ b/Help/policy/CMP0098.rst @@ -24,9 +24,8 @@ to generate implicit files. The ``NEW`` behavior of this policy is to use the current binary directory for the ``WORKING_DIRECTORY`` relative to which implicit files are generated unless provided as absolute path. -This policy was introduced in CMake version 3.17. Use the -:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. -Unlike many policies, CMake version |release| does *not* warn -when this policy is not set and simply uses ``OLD`` behavior. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.17 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0099.rst b/Help/policy/CMP0099.rst index 0c64949..c0db99d 100644 --- a/Help/policy/CMP0099.rst +++ b/Help/policy/CMP0099.rst @@ -18,9 +18,8 @@ The ``OLD`` behavior for this policy is to not propagate interface link properties. The ``NEW`` behavior of this policy is to propagate interface link properties. -This policy was introduced in CMake version 3.17. Use the -:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. -Unlike many policies, CMake version |release| does *not* warn -when this policy is not set and simply uses ``OLD`` behavior. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.17 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0100.rst b/Help/policy/CMP0100.rst index 730fa82..c3b782b 100644 --- a/Help/policy/CMP0100.rst +++ b/Help/policy/CMP0100.rst @@ -34,9 +34,8 @@ in :prop_tgt:`AUTOMOC` and :prop_tgt:`AUTOUIC` just like other header files. set_property(SOURCE /path/to/file2.hh PROPERTY SKIP_AUTOUIC ON) set_property(SOURCE /path/to/file3.hh PROPERTY SKIP_AUTOGEN ON) -This policy was introduced in CMake version 3.17.0. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. -Use the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` -explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.17.0 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0101.rst b/Help/policy/CMP0101.rst index 6781079..ceefcda 100644 --- a/Help/policy/CMP0101.rst +++ b/Help/policy/CMP0101.rst @@ -22,9 +22,8 @@ when inserting into the :prop_tgt:`COMPILE_OPTIONS` property. The ``NEW`` behavior for this policy is to honor the ``BEFORE`` keyword in all cases. -This policy was introduced in CMake version 3.17. Use the -:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. -Unlike many policies, CMake version |release| does *not* warn -when this policy is not set and simply uses ``OLD`` behavior. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.17 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0102.rst b/Help/policy/CMP0102.rst index 08024bf..8590979 100644 --- a/Help/policy/CMP0102.rst +++ b/Help/policy/CMP0102.rst @@ -19,11 +19,11 @@ The ``OLD`` behavior for this policy is to create the empty cache definition. The ``NEW`` behavior of this policy is to ignore variables which do not already exist in the cache. -This policy was introduced in CMake version 3.17. Use the -:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. -Unlike many policies, CMake version |release| does *not* warn -when this policy is not set and simply uses ``OLD`` behavior. See -documentation of the :variable:`CMAKE_POLICY_WARNING_CMP0102 +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.17 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn by default +.. include:: STANDARD_ADVICE.txt + +See documentation of the :variable:`CMAKE_POLICY_WARNING_CMP0102 <CMAKE_POLICY_WARNING_CMP<NNNN>>` variable to control the warning. .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0103.rst b/Help/policy/CMP0103.rst index b5f44d1..50bceba 100644 --- a/Help/policy/CMP0103.rst +++ b/Help/policy/CMP0103.rst @@ -16,9 +16,8 @@ The ``OLD`` behavior for this policy is to ignore the multiple occurrences of The ``NEW`` behavior of this policy is to raise an error on second call to :command:`export` command with same ``FILE`` without ``APPEND``. -This policy was introduced in CMake version 3.18. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. -Use the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` -explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.18 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0104.rst b/Help/policy/CMP0104.rst index b125729..9e8d222 100644 --- a/Help/policy/CMP0104.rst +++ b/Help/policy/CMP0104.rst @@ -29,10 +29,9 @@ If :prop_tgt:`CUDA_ARCHITECTURES` is set to a false value no architectures flags are passed to the compiler. This is intended to support packagers and the rare cases where full control over the passed flags is required. -This policy was introduced in CMake version 3.18. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. -Use the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` -explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.18 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0105.rst b/Help/policy/CMP0105.rst index aadc8d6..8726997 100644 --- a/Help/policy/CMP0105.rst +++ b/Help/policy/CMP0105.rst @@ -14,9 +14,8 @@ device link step. The ``NEW`` behavior of this policy is to use the link options during the device link step. -This policy was introduced in CMake version 3.18. Use the -:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. -Unlike many policies, CMake version |release| does *not* warn -when this policy is not set and simply uses ``OLD`` behavior. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.18 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0106.rst b/Help/policy/CMP0106.rst index 18a6635..5f7e078 100644 --- a/Help/policy/CMP0106.rst +++ b/Help/policy/CMP0106.rst @@ -14,8 +14,8 @@ The ``OLD`` behavior of this policy is for :module:`Documentation` to add cache variables and find VTK documentation dependent packages. The ``NEW`` behavior is to act as an empty module. -This policy was introduced in CMake version 3.18. CMake version |release| -warns when the policy is not set and uses ``OLD`` behavior. Use the -:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.18 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0107.rst b/Help/policy/CMP0107.rst index da5ae06..ece0b23 100644 --- a/Help/policy/CMP0107.rst +++ b/Help/policy/CMP0107.rst @@ -13,9 +13,8 @@ The ``OLD`` behavior for this policy is to allow target overwrite. The ``NEW`` behavior of this policy is to prevent target overwriting. -This policy was introduced in CMake version 3.17. Use the -:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. -Unlike many policies, CMake version |release| does *not* warn -when this policy is not set and simply uses ``OLD`` behavior. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.17 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0108.rst b/Help/policy/CMP0108.rst index 4d1091d..fbb72b3 100644 --- a/Help/policy/CMP0108.rst +++ b/Help/policy/CMP0108.rst @@ -13,9 +13,8 @@ aliased to itself. The ``NEW`` behavior of this policy is to prevent a target to link to itself through an ``ALIAS`` target. -This policy was introduced in CMake version 3.17. Use the -:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. -Unlike many policies, CMake version |release| does *not* warn -when this policy is not set and simply uses ``OLD`` behavior. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.17 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0109.rst b/Help/policy/CMP0109.rst index f86287f..2073d72 100644 --- a/Help/policy/CMP0109.rst +++ b/Help/policy/CMP0109.rst @@ -17,8 +17,8 @@ read permission but not execute permission. The ``NEW`` behavior for this policy is for ``find_program`` to require execute permission but not read permission. -This policy was introduced in CMake version 3.19. CMake version |release| -warns when the policy is not set and uses ``OLD`` behavior. Use the -:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.19 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0110.rst b/Help/policy/CMP0110.rst index 6977d41..ad9e096 100644 --- a/Help/policy/CMP0110.rst +++ b/Help/policy/CMP0110.rst @@ -21,6 +21,8 @@ handling whitespace and special characters properly (if not using the mentioned workaround). The ``NEW`` behavior on the other hand allows names with whitespace and special characters for tests created by ``add_test``. -This policy was introduced in CMake version 3.19. CMake version |release| -warns when the policy is not set and uses ``OLD`` behavior. Use the -:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.19 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt + +.. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0111.rst b/Help/policy/CMP0111.rst index e327583..33a925b 100644 --- a/Help/policy/CMP0111.rst +++ b/Help/policy/CMP0111.rst @@ -20,8 +20,8 @@ unknown, static or shared library target as ``<TARGET_NAME>-NOTFOUND`` if not set. The ``NEW`` behavior is to raise an error. -This policy was introduced in CMake version 3.19. CMake version |release| -warns when the policy is not set and uses ``OLD`` behavior. Use the -:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.19 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0112.rst b/Help/policy/CMP0112.rst index 25c3896..2d21d96 100644 --- a/Help/policy/CMP0112.rst +++ b/Help/policy/CMP0112.rst @@ -34,9 +34,11 @@ target for the above generator expressions. The ``NEW`` behavior of this policy is to not add a dependency on the evaluated target for the above generator expressions. -This policy was introduced in CMake version 3.19. Unlike many policies, -CMake version |release| does *not* warn by default when this policy -is not set and simply uses ``OLD`` behavior. See documentation of the +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.19 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn by default +.. include:: STANDARD_ADVICE.txt + +See documentation of the :variable:`CMAKE_POLICY_WARNING_CMP0112 <CMAKE_POLICY_WARNING_CMP<NNNN>>` variable to control the warning. diff --git a/Help/policy/CMP0113.rst b/Help/policy/CMP0113.rst index 6f56902..1908727 100644 --- a/Help/policy/CMP0113.rst +++ b/Help/policy/CMP0113.rst @@ -36,8 +36,8 @@ The ``OLD`` behavior for this policy is to duplicate custom commands in dependent targets. The ``NEW`` behavior of this policy is to not duplicate custom commands in dependent targets. -This policy was introduced in CMake version 3.19. Unlike many policies, -CMake version |release| does *not* warn when this policy is not set and -simply uses ``OLD`` behavior. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.19 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0114.rst b/Help/policy/CMP0114.rst index ae48478..f4ca7ef 100644 --- a/Help/policy/CMP0114.rst +++ b/Help/policy/CMP0114.rst @@ -79,7 +79,8 @@ is to use the above-documented behavior from 3.18 and below. The ``NEW`` behavior for this policy is to use the above-documented behavior preferred by 3.19 and above. -This policy was introduced in CMake version 3.19. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. -Use the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` -explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.19 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt + +.. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0115.rst b/Help/policy/CMP0115.rst index 7f82c43..b11f97d 100644 --- a/Help/policy/CMP0115.rst +++ b/Help/policy/CMP0115.rst @@ -27,8 +27,8 @@ The ``OLD`` behavior for this policy is to implicitly append known extensions to source files if they can't be found. The ``NEW`` behavior of this policy is to not append known extensions and require them to be explicit. -This policy was introduced in CMake version 3.20. CMake version |release| -warns when the policy is not set and uses ``OLD`` behavior. Use the -:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.20 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0116.rst b/Help/policy/CMP0116.rst index 18e5a96..b0fc896 100644 --- a/Help/policy/CMP0116.rst +++ b/Help/policy/CMP0116.rst @@ -33,9 +33,13 @@ time of the custom command's creation, and you can have custom commands in the same directory with different values for ``CMP0116`` by setting the policy before each custom command. -This policy was introduced in CMake version 3.20. Unlike most policies, -CMake version |release| does *not* warn by default when this policy is not set -(unless ``DEPFILE`` is used in a subdirectory) and simply uses ``OLD`` -behavior. See documentation of the +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.20 +.. |WARNS_OR_DOES_NOT_WARN| replace:: + does *not* warn by default (unless ``DEPFILE`` is used in a subdirectory) +.. include:: STANDARD_ADVICE.txt + +See documentation of the :variable:`CMAKE_POLICY_WARNING_CMP0116 <CMAKE_POLICY_WARNING_CMP<NNNN>>` variable to control the warning. + +.. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0117.rst b/Help/policy/CMP0117.rst index 0c4dd30..e1a0ee9 100644 --- a/Help/policy/CMP0117.rst +++ b/Help/policy/CMP0117.rst @@ -35,9 +35,8 @@ default :variable:`CMAKE_CXX_FLAGS <CMAKE_<LANG>_FLAGS>` cache entry. The ``NEW`` behavior for this policy is to *not* place the MSVC ``/GR`` flag in the default cache entry. -This policy was introduced in CMake version 3.20. Use the -:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. -Unlike many policies, CMake version |release| does *not* warn -when this policy is not set and simply uses ``OLD`` behavior. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.20 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0118.rst b/Help/policy/CMP0118.rst index aa7e0f7..00afadf 100644 --- a/Help/policy/CMP0118.rst +++ b/Help/policy/CMP0118.rst @@ -17,9 +17,11 @@ The ``OLD`` behavior of this policy is to only allow ``GENERATED`` to be visible from the directory scope for which it was set. The ``NEW`` behavior on the other hand allows it to be visible from any scope. -This policy was introduced in CMake version 3.20. Use the -:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. -Unlike many policies, CMake version |release| does *not* warn -when this policy is not set and simply uses ``OLD`` behavior with regard -to visibility of the ``GENERATED`` property. However, CMake does warn -about setting the ``GENERATED`` property to a non-boolean value. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.20 +.. |WARNS_OR_DOES_NOT_WARN| replace:: + does *not* warn with regard to visibility of the ``GENERATED`` + property, but does warn about setting the ``GENERATED`` property + to a non-boolean value, +.. include:: STANDARD_ADVICE.txt + +.. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0119.rst b/Help/policy/CMP0119.rst index 61c8bdc..78e9894 100644 --- a/Help/policy/CMP0119.rst +++ b/Help/policy/CMP0119.rst @@ -28,9 +28,8 @@ property using its undocumented meaning to "use the ``<LANG>`` compiler". The ``NEW`` behavior for this policy is to interpret the ``LANGUAGE <LANG>`` property using its documented meaning to "compile as a ``<LANG>`` source". -This policy was introduced in CMake version 3.20. Use the -:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. -Unlike many policies, CMake version |release| does *not* warn -when this policy is not set and simply uses ``OLD`` behavior. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.20 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0120.rst b/Help/policy/CMP0120.rst index 9d2f6c9..0ffeb0e 100644 --- a/Help/policy/CMP0120.rst +++ b/Help/policy/CMP0120.rst @@ -38,9 +38,9 @@ The ``OLD`` behavior of this policy is for inclusion of the deprecated :module:`WriteCompilerDetectionHeader` module to work. The ``NEW`` behavior is for inclusion of the module to fail as if it does not exist. -This policy was introduced in CMake version 3.20. CMake version |release| -warns when the policy is not set and uses ``OLD`` behavior. Use the -:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.20 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0121.rst b/Help/policy/CMP0121.rst index 326e7d5..6e08cb5 100644 --- a/Help/policy/CMP0121.rst +++ b/Help/policy/CMP0121.rst @@ -14,8 +14,8 @@ their integer value (if any) at the start of the string. For example, ``2good4you`` is a ``2`` and ``not_an_integer`` is a ``0``. The ``NEW`` behavior is for invalid indices to trigger an error. -This policy was introduced in CMake version 3.21. CMake version |release| -warns when the policy is not set and uses ``OLD`` behavior. Use the -:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.21 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0122.rst b/Help/policy/CMP0122.rst index 1ff8c48..0b2da6c 100644 --- a/Help/policy/CMP0122.rst +++ b/Help/policy/CMP0122.rst @@ -9,9 +9,8 @@ Starting with CMake 3.21, :module:`UseSWIG` generates now a library using default naming conventions. This policy provides compatibility with projects that expect the legacy behavior. -This policy was introduced in CMake version 3.21. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. -Use the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` -explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.21 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0123.rst b/Help/policy/CMP0123.rst index e09b5ec..85f23a4 100644 --- a/Help/policy/CMP0123.rst +++ b/Help/policy/CMP0123.rst @@ -25,8 +25,8 @@ a link option ``--cpu=`` based on those variables. The ``NEW`` behavior does not add compile or link options, and projects are responsible for setting correct options. -This policy was introduced in CMake version 3.21. CMake version |release| -warns when the policy is not set and uses ``OLD`` behavior. Use the -:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.21 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0124.rst b/Help/policy/CMP0124.rst index d5cde64..2c19cac 100644 --- a/Help/policy/CMP0124.rst +++ b/Help/policy/CMP0124.rst @@ -42,9 +42,8 @@ For example: Under the ``OLD`` behavior, this code prints ``var1: value`` and ``var2:``. Under the ``NEW`` behavior, this code prints only ``var1: value``. -This policy was introduced in CMake version 3.21. Use the -:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. -Unlike many policies, CMake version |release| does *not* warn when the policy -is not set and simply uses ``OLD`` behavior. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.21 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0125.rst b/Help/policy/CMP0125.rst index 0b1704e..8c5e23a 100644 --- a/Help/policy/CMP0125.rst +++ b/Help/policy/CMP0125.rst @@ -34,9 +34,8 @@ described above. When it is set to ``NEW``, the behavior is as follows: the result variable, except where a relative path provided by a cache or non-cache variable cannot be resolved to an existing path. -This policy was introduced in CMake version 3.21. Use the -:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. -Unlike many policies, CMake version |release| does *not* warn when the policy -is not set and simply uses ``OLD`` behavior. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.21 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0126.rst b/Help/policy/CMP0126.rst index a389512..ca40709 100644 --- a/Help/policy/CMP0126.rst +++ b/Help/policy/CMP0126.rst @@ -24,14 +24,16 @@ regardless of the ``CMP0126`` policy setting. The :command:`option` command will *not* set the cache variable if a non-cache variable of the same name already exists and :policy:`CMP0077` is set to ``NEW``. -Policy ``CMP0126`` was introduced in CMake version 3.21. Use the -:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly -within a project. Use the :variable:`CMAKE_POLICY_DEFAULT_CMP0126 -<CMAKE_POLICY_DEFAULT_CMP\<NNNN\>>` variable to set the policy for -a third-party project in a subdirectory without modifying it. -Unlike many policies, CMake version |release| does *not* warn when the policy -is not set and simply uses ``OLD`` behavior. See documentation of the +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.21 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn by default +.. include:: STANDARD_ADVICE.txt + +See documentation of the :variable:`CMAKE_POLICY_WARNING_CMP0126 <CMAKE_POLICY_WARNING_CMP<NNNN>>` variable to control the warning. +The :variable:`CMAKE_POLICY_DEFAULT_CMP0126 <CMAKE_POLICY_DEFAULT_CMP\<NNNN\>>` +variable may be used to set the policy for a third-party project in a +subdirectory without modifying it. + .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0127.rst b/Help/policy/CMP0127.rst index 2106110..3de4f5e 100644 --- a/Help/policy/CMP0127.rst +++ b/Help/policy/CMP0127.rst @@ -26,9 +26,8 @@ to be re-written as:: Policy ``CMP0127`` provides compatibility for projects that have not been updated to expect the new behavior. -This policy was introduced in CMake version 3.22. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. -Use the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` -explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.22 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0128.rst b/Help/policy/CMP0128.rst index 604a146..7d2c537 100644 --- a/Help/policy/CMP0128.rst +++ b/Help/policy/CMP0128.rst @@ -61,9 +61,10 @@ using :variable:`CMAKE_<LANG>_FLAGS_INIT`) then they will affect the detected default :variable:`standard <CMAKE_<LANG>_STANDARD_DEFAULT>` and :variable:`extensions <CMAKE_<LANG>_EXTENSIONS_DEFAULT>`. -Unlike many policies, CMake version |release| does *not* warn when the policy -is not set and simply uses the ``OLD`` behavior. Use the -:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.22 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn by default +.. include:: STANDARD_ADVICE.txt + See documentation of the :variable:`CMAKE_POLICY_WARNING_CMP0128 <CMAKE_POLICY_WARNING_CMP<NNNN>>` variable to control the warning. diff --git a/Help/policy/CMP0129.rst b/Help/policy/CMP0129.rst index 31a26e5..08ef8d1 100644 --- a/Help/policy/CMP0129.rst +++ b/Help/policy/CMP0129.rst @@ -23,10 +23,10 @@ The ``OLD`` behavior for this policy is to use compiler id ``GNU`` (and set :variable:`CMAKE_<LANG>_SIMULATE_ID` to ``GNU``, and :variable:`CMAKE_<LANG>_SIMULATE_VERSION` to the supported GNU compiler version. -This policy was introduced in CMake version 3.23. Use the -:command:`cmake_policy` command to set this policy to ``OLD`` or ``NEW`` explicitly. -Unlike most policies, CMake version |release| does *not* warn -by default when this policy is not set and simply uses ``OLD`` behavior. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.23 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn by default +.. include:: STANDARD_ADVICE.txt + See documentation of the :variable:`CMAKE_POLICY_WARNING_CMP0129 <CMAKE_POLICY_WARNING_CMP<NNNN>>` variable to control the warning. diff --git a/Help/policy/CMP0130.rst b/Help/policy/CMP0130.rst index 0dd5623..79f1ebb 100644 --- a/Help/policy/CMP0130.rst +++ b/Help/policy/CMP0130.rst @@ -25,8 +25,8 @@ The ``OLD`` behavior for this policy is to ignore errors in :command:`while` conditions. The ``NEW`` behavior for this policy is to diagnose errors in :command:`while` conditions. -This policy was introduced in CMake version 3.24. CMake version |release| -warns when the policy is not set and uses ``OLD`` behavior. Use the -:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.24 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0131.rst b/Help/policy/CMP0131.rst index d5430e4..8899943 100644 --- a/Help/policy/CMP0131.rst +++ b/Help/policy/CMP0131.rst @@ -23,9 +23,8 @@ content guarded by :genex:`$<LINK_ONLY:...>` even for non-linking usage requirements. The ``NEW`` behavior for this policy is to use the guarded content only for link dependencies. -This policy was introduced in CMake version 3.24. Use the -:command:`cmake_policy` command to set this policy to ``OLD`` or ``NEW`` -explicitly. Unlike many policies, CMake version |release| does *not* -warn when this policy is not set, and simply uses ``OLD`` behavior. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.24 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0132.rst b/Help/policy/CMP0132.rst index fadbbdc..c2a90c2 100644 --- a/Help/policy/CMP0132.rst +++ b/Help/policy/CMP0132.rst @@ -18,9 +18,8 @@ The ``OLD`` behavior for this policy sets the relevant environment variable on the first run when a language is enabled. The ``NEW`` behavior for this policy does not set any such environment variables. -This policy was introduced in CMake version 3.24. Use the -:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. -Unlike many policies, CMake version |release| does *not* warn -when this policy is not set and simply uses ``OLD`` behavior. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.24 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0133.rst b/Help/policy/CMP0133.rst index c19bcf9..3bccd15 100644 --- a/Help/policy/CMP0133.rst +++ b/Help/policy/CMP0133.rst @@ -21,10 +21,10 @@ The ``OLD`` behavior for this policy is to enable :variable:`CPACK_DMG_SLA_USE_RESOURCE_FILE_LICENSE` by default. The ``NEW`` behavior for this policy is to not enable it by default. -This policy was introduced in CMake version 3.24. Use the -:command:`cmake_policy` command to set this policy to ``OLD`` or ``NEW`` -explicitly. Unlike many policies, CMake version |release| does *not* warn -by default when this policy is not set and simply uses ``OLD`` behavior. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.24 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn by default +.. include:: STANDARD_ADVICE.txt + See documentation of the :variable:`CMAKE_POLICY_WARNING_CMP0133 <CMAKE_POLICY_WARNING_CMP<NNNN>>` variable to control the warning. diff --git a/Help/policy/CMP0134.rst b/Help/policy/CMP0134.rst index a94012c..986d58e 100644 --- a/Help/policy/CMP0134.rst +++ b/Help/policy/CMP0134.rst @@ -28,9 +28,8 @@ The ``OLD`` behavior for this policy is to use registry views ``64`` and The ``NEW`` behavior for this policy is to use registry views ``TARGET`` and ``BOTH`` as default. -This policy was introduced in CMake version 3.24. Use the -:command:`cmake_policy` command to set this policy to ``OLD`` or ``NEW`` -explicitly. Unlike many policies, CMake version |release| does *not* warn -when this policy is not set and simply uses ``OLD`` behavior. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.24 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0135.rst b/Help/policy/CMP0135.rst index 1c0c134..c8d9205 100644 --- a/Help/policy/CMP0135.rst +++ b/Help/policy/CMP0135.rst @@ -22,8 +22,8 @@ given, this policy controls the default behavior. The ``OLD`` behavior for this policy is to restore the timestamps from the archive. The ``NEW`` behavior sets the timestamps of extracted contents to the time of extraction. -This policy was introduced in CMake version 3.24. CMake version |release| -warns when the policy is not set and uses ``OLD`` behavior. Use the -:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.24 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0136.rst b/Help/policy/CMP0136.rst index 5414278..0980c87 100644 --- a/Help/policy/CMP0136.rst +++ b/Help/policy/CMP0136.rst @@ -42,9 +42,8 @@ entries and ignore the :variable:`CMAKE_WATCOM_RUNTIME_LIBRARY` abstraction. The ``NEW`` behavior for this policy is to *not* place Watcom runtime library flags in the default cache entries and use the abstraction instead. -This policy was introduced in CMake version 3.24. Use the -:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. -Unlike many policies, CMake version |release| does *not* warn -when this policy is not set and simply uses ``OLD`` behavior. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.24 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0137.rst b/Help/policy/CMP0137.rst index ba3cb9c..3d879d1 100644 --- a/Help/policy/CMP0137.rst +++ b/Help/policy/CMP0137.rst @@ -25,9 +25,8 @@ Regardless of the policy setting, the :variable:`CMAKE_TRY_COMPILE_NO_PLATFORM_VARIABLES` variable may be set to suppress passing the platform variables through either signature. -This policy was introduced in CMake version 3.24. Use the -:command:`cmake_policy` command to set this policy to ``OLD`` or ``NEW`` -explicitly. Unlike many policies, CMake version |release| does *not* warn -by default when this policy is not set and simply uses ``OLD`` behavior. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.24 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0138.rst b/Help/policy/CMP0138.rst index a86849d..f933b90 100644 --- a/Help/policy/CMP0138.rst +++ b/Help/policy/CMP0138.rst @@ -23,9 +23,8 @@ project's values of :variable:`CMAKE_<LANG>_FLAGS` and for this policy is to use the values of those variables as compiler flags in the test project. -This policy was introduced in CMake version 3.24. Use the -:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. -Unlike many policies, CMake version |release| does *not* warn -when this policy is not set and simply uses ``OLD`` behavior. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.24 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0139.rst b/Help/policy/CMP0139.rst index 5a0f4f7..640055d 100644 --- a/Help/policy/CMP0139.rst +++ b/Help/policy/CMP0139.rst @@ -9,9 +9,8 @@ operator. The ``OLD`` behavior for this policy is to ignore the ``PATH_EQUAL`` operator. The ``NEW`` behavior is to interpret the ``PATH_EQUAL`` operator. -This policy was introduced in CMake version 3.24. -CMake version |release| warns when the policy is not set and uses -``OLD`` behavior. Use the :command:`cmake_policy` command to set -it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.24 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0140.rst b/Help/policy/CMP0140.rst index dea8989..4236017 100644 --- a/Help/policy/CMP0140.rst +++ b/Help/policy/CMP0140.rst @@ -9,9 +9,8 @@ The ``OLD`` behavior for this policy is to ignore any parameters given to the command. The ``NEW`` behavior is to check the validity of the parameters. -This policy was introduced in CMake version 3.25. -CMake version |release| warns when the policy is not set and uses -``OLD`` behavior. Use the :command:`cmake_policy` command to set -it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.25 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0141.rst b/Help/policy/CMP0141.rst index 970e41d..1aef848 100644 --- a/Help/policy/CMP0141.rst +++ b/Help/policy/CMP0141.rst @@ -47,9 +47,8 @@ abstraction. The ``NEW`` behavior for this policy is to *not* place MSVC debug information format flags in the default cache entries and use the abstraction instead. -This policy was introduced in CMake version 3.25. Use the -:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. -Unlike many policies, CMake version |release| does *not* warn -when this policy is not set and simply uses ``OLD`` behavior. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.25 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0142.rst b/Help/policy/CMP0142.rst index 1f928f0..e4b1440 100644 --- a/Help/policy/CMP0142.rst +++ b/Help/policy/CMP0142.rst @@ -19,9 +19,8 @@ The ``OLD`` behavior for this policy is to append ``$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)`` to all library search paths. The ``NEW`` behavior is to not modify library search paths. -This policy was introduced in CMake version 3.25. Use the -:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. -Unlike many policies, CMake version |release| does *not* warn -when this policy is not set and simply uses ``OLD`` behavior. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.25 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0143.rst b/Help/policy/CMP0143.rst index 24fdc27..b3bbb28 100644 --- a/Help/policy/CMP0143.rst +++ b/Help/policy/CMP0143.rst @@ -22,9 +22,10 @@ to the whole project. This policy provides compatibility with projects that have not been updated to expect enabling of folders. Enabling folders causes projects to appear -differently in IDEs. The policy was introduced in CMake version 3.26. Use the -:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. -Unlike many policies, CMake version |release| does *not* warn -when this policy is not set and simply uses ``OLD`` behavior. +differently in IDEs. + +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.26 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0144.rst b/Help/policy/CMP0144.rst index 3959d96..81e622a 100644 --- a/Help/policy/CMP0144.rst +++ b/Help/policy/CMP0144.rst @@ -18,9 +18,8 @@ variables if the original ``<PackageName>`` has lower-case characters. The ``NEW`` behavior for this policy is to use ``<PACKAGENAME>_ROOT`` variables. -This policy was introduced in CMake version 3.27. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. -Use the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` -explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.27 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0145.rst b/Help/policy/CMP0145.rst index bb1c02e..9b0d43f 100644 --- a/Help/policy/CMP0145.rst +++ b/Help/policy/CMP0145.rst @@ -22,9 +22,8 @@ The ``OLD`` behavior of this policy is for ``include(Dart)`` and ``find_package(Dart)`` to load the deprecated modules. The ``NEW`` behavior is for uses of the modules to fail as if they do not exist. -This policy was introduced in CMake version 3.27. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. -Use the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` -explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.27 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0146.rst b/Help/policy/CMP0146.rst index c7cac22..7d6ba19 100644 --- a/Help/policy/CMP0146.rst +++ b/Help/policy/CMP0146.rst @@ -21,9 +21,8 @@ The ``OLD`` behavior of this policy is for ``find_package(CUDA)`` to load the deprecated module. The ``NEW`` behavior is for uses of the module to fail as if it does not exist. -This policy was introduced in CMake version 3.27. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. -Use the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` -explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.27 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0147.rst b/Help/policy/CMP0147.rst index 0f25096..fd5dc5f 100644 --- a/Help/policy/CMP0147.rst +++ b/Help/policy/CMP0147.rst @@ -16,9 +16,8 @@ The ``OLD`` behavior for this policy is to not add ``BuildInParallel``. The ``NEW`` behavior for this policy is to add ``BuildInParallel`` for VS 15.8 and newer. -This policy was introduced in CMake version 3.27. Use the -:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. -Unlike many policies, CMake version |release| does *not* warn -when this policy is not set and simply uses ``OLD`` behavior. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.27 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0148.rst b/Help/policy/CMP0148.rst index 2f5c43d..c522c6a 100644 --- a/Help/policy/CMP0148.rst +++ b/Help/policy/CMP0148.rst @@ -21,9 +21,8 @@ The ``OLD`` behavior of this policy is for ``find_package(PythonInterp)`` and ``find_package(PythonLibs)`` to load the deprecated modules. The ``NEW`` behavior is for uses of the modules to fail as if they do not exist. -This policy was introduced in CMake version 3.27. CMake version -|release| warns when the policy is not set and uses ``OLD`` behavior. -Use the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` -explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.27 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0149.rst b/Help/policy/CMP0149.rst index a84149f..11e935d 100644 --- a/Help/policy/CMP0149.rst +++ b/Help/policy/CMP0149.rst @@ -46,9 +46,8 @@ The ``OLD`` behavior for this policy is to use the exact value of :variable:`CMAKE_SYSTEM_VERSION` if possible. The ``NEW`` behavior for this policy is to ignore it. -This policy was introduced in CMake version 3.27. Use the -:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. -Unlike many policies, CMake version |release| does *not* warn -when this policy is not set and simply uses ``OLD`` behavior. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.27 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0150.rst b/Help/policy/CMP0150.rst index fe646d9..e8c58ef 100644 --- a/Help/policy/CMP0150.rst +++ b/Help/policy/CMP0150.rst @@ -31,9 +31,9 @@ The remote is selected according to the following (the first match is used): If an appropriate remote cannot be determined from the above, a fatal error will be raised. -This policy was introduced in CMake version 3.27. CMake version |release| -warns when a relative path is encountered and the policy is not set, -falling back to using ``OLD`` behavior. Use the :command:`cmake_policy` -command to set it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.27 +.. |WARNS_OR_DOES_NOT_WARN| replace:: + warns when a relative path is encountered +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0151.rst b/Help/policy/CMP0151.rst index c12f595..49b0811 100644 --- a/Help/policy/CMP0151.rst +++ b/Help/policy/CMP0151.rst @@ -20,9 +20,8 @@ the target's include directories. The ``NEW`` behavior for this policy is to add autogen include directory to the target's system include directories. -This policy was introduced in CMake version 3.27. Use the -:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. -Unlike many policies, CMake version |release| does *not* warn -when this policy is not set and simply uses ``OLD`` behavior. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.27 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0152.rst b/Help/policy/CMP0152.rst index d7e8692..94109e3 100644 --- a/Help/policy/CMP0152.rst +++ b/Help/policy/CMP0152.rst @@ -14,7 +14,8 @@ resolving symlinks. The ``NEW`` behavior for this policy is to resolve all symlinks before collapsing ``../`` components. -This policy was introduced in CMake version 3.28. Use the -:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.28 +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0154.rst b/Help/policy/CMP0154.rst index bf398af..89a4f67 100644 --- a/Help/policy/CMP0154.rst +++ b/Help/policy/CMP0154.rst @@ -51,9 +51,8 @@ to produce conservative build graphs. The ``NEW`` behavior for this policy is to assume generated files are private in targets using file sets, and for :ref:`Ninja Generators` to produce more efficient build graphs. -This policy was introduced in CMake version 3.28. Use the -:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. -Unlike many policies, CMake version |release| does *not* warn -when this policy is not set and simply uses ``OLD`` behavior. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.28 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0155.rst b/Help/policy/CMP0155.rst index 8b741cb..5397c0d 100644 --- a/Help/policy/CMP0155.rst +++ b/Help/policy/CMP0155.rst @@ -20,9 +20,8 @@ sources do not import modules. The ``NEW`` behavior for this policy is to assume that C++ 20 and newer files may import modules if the compiler understands how to scan for their dependencies, and need to be scanned. -This policy was introduced in CMake version 3.28. Use the -:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. -Unlike many policies, CMake version |release| does *not* warn -when this policy is not set and simply uses ``OLD`` behavior. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.28 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0156.rst b/Help/policy/CMP0156.rst index fa97519..6fa0f04 100644 --- a/Help/policy/CMP0156.rst +++ b/Help/policy/CMP0156.rst @@ -16,7 +16,7 @@ symbols in the unresolved set. Handling mutually dependent archives may be awkward when using a traditional linker. Archive files may have to be specified multiple times. -Some linkers (for instance Apple or Windows linkers, as well as``LLVM LLD``) +Some linkers (for instance Apple or Windows linkers, as well as ``LLVM LLD``) records all symbols found in objects and archives as it iterates over command line arguments. When one of these linkers encounters an undefined symbol that can be resolved by an object file contained in a previously processed archive @@ -39,9 +39,8 @@ as if using a traditional linker, and always de-duplicate shared libraries by keeping the last occurrence of each. The ``NEW`` behavior for this policy is to apply different strategies based on linker capabilities. -This policy was introduced in CMake version 3.29. Use the -:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. -Unlike many policies, CMake version |release| does *not* warn -when this policy is not set and simply uses ``OLD`` behavior. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.29 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0157.rst b/Help/policy/CMP0157.rst index a8f8210..c607203 100644 --- a/Help/policy/CMP0157.rst +++ b/Help/policy/CMP0157.rst @@ -40,9 +40,8 @@ The ``NEW`` behavior for this policy is to apply the compilation mode specified in the :prop_tgt:`Swift_COMPILATION_MODE` target property, initialized as each target is created by the :variable:`CMAKE_Swift_COMPILATION_MODE` variable. -This policy was introduced in CMake version 3.29. Use the -:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. -Unlike many policies, CMake version |release| does *not* warn when this policy -is not set and simply uses ``OLD`` behavior. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.29 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0158.rst b/Help/policy/CMP0158.rst index 369b5ec..66e5a62 100644 --- a/Help/policy/CMP0158.rst +++ b/Help/policy/CMP0158.rst @@ -21,9 +21,8 @@ The ``NEW`` behavior for this policy is for :command:`add_test` to use the :prop_tgt:`CROSSCOMPILING_EMULATOR` target property only when :variable:`cross-compiling <CMAKE_CROSSCOMPILING>`. -This policy was introduced in CMake version 3.29. Use the -:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. -Unlike many policies, CMake version |release| does *not* warn -when this policy is not set and simply uses ``OLD`` behavior. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.29 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0159.rst b/Help/policy/CMP0159.rst index 2d05282..908ef0f 100644 --- a/Help/policy/CMP0159.rst +++ b/Help/policy/CMP0159.rst @@ -16,9 +16,8 @@ The ``OLD`` behavior for this policy is for :command:`file(STRINGS)` with ``REGEX`` to not store capture groups in :variable:`CMAKE_MATCH_<n>` variables. The ``NEW`` behavior is to store the capture groups. -This policy was introduced in CMake version 3.29. Use the -:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. -Unlike many policies, CMake version |release| does *not* warn -when this policy is not set and simply uses ``OLD`` behavior. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.29 +.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn +.. include:: STANDARD_ADVICE.txt .. include:: DEPRECATED.txt diff --git a/Help/policy/DISALLOWED_COMMAND.txt b/Help/policy/DISALLOWED_COMMAND.txt index 6500bb0..506f2bb 100644 --- a/Help/policy/DISALLOWED_COMMAND.txt +++ b/Help/policy/DISALLOWED_COMMAND.txt @@ -3,7 +3,6 @@ The ``OLD`` behavior for this policy is to allow the command to be called. The ``NEW`` behavior for this policy is to issue a ``FATAL_ERROR`` when the command is called. -This policy was introduced in CMake version |disallowed_version|. -CMake version |release| warns when the policy is not set and uses -``OLD`` behavior. Use the :command:`cmake_policy` command to set it to ``OLD`` or -``NEW`` explicitly. +.. |INTRODUCED_IN_CMAKE_VERSION| replace:: |disallowed_version| +.. |WARNS_OR_DOES_NOT_WARN| replace:: warns +.. include:: STANDARD_ADVICE.txt diff --git a/Help/policy/STANDARD_ADVICE.txt b/Help/policy/STANDARD_ADVICE.txt new file mode 100644 index 0000000..925c174 --- /dev/null +++ b/Help/policy/STANDARD_ADVICE.txt @@ -0,0 +1,3 @@ +This policy was introduced in CMake version |INTRODUCED_IN_CMAKE_VERSION|. +It may be set by :command:`cmake_policy` or :command:`cmake_minimum_required`. +If it is not set, CMake |WARNS_OR_DOES_NOT_WARN|, and uses ``OLD`` behavior. diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake index b90a45f..24703a3 100644 --- a/Modules/FindMatlab.cmake +++ b/Modules/FindMatlab.cmake @@ -378,32 +378,21 @@ endmacro() Returns the release name from the version of Matlab #]=======================================================================] -macro(matlab_get_release_name_from_version version release_name) +function(matlab_get_release_name_from_version version release_name) # only the major.minor version is used - string(REGEX MATCH "([0-9]+\\.[0-9]+)" _match ${version}) - if(CMAKE_MATCH_1) - set(short_version ${CMAKE_MATCH_1}) - else() - set(short_version ${version}) - endif() + string(REGEX REPLACE "^([0-9]+\\.[0-9]+).*" "\\1" version "${version}") - set(${release_name} "") foreach(_var IN LISTS MATLAB_VERSIONS_MAPPING) - string(REGEX MATCHALL "(.+)=${short_version}" _matched ${_var}) - if(NOT _matched STREQUAL "") - set(${release_name} ${CMAKE_MATCH_1}) - break() + if(_var MATCHES "(.+)=${version}") + set(${release_name} ${CMAKE_MATCH_1} PARENT_SCOPE) + return() endif() endforeach() - unset(_var) - unset(_matched) - if(${release_name} STREQUAL "") - message(WARNING "[MATLAB] The version ${short_version} is not registered") - endif() + message(WARNING "[MATLAB] The version ${version} is not registered") -endmacro() +endfunction() # extracts all the supported release names (R2022b...) of Matlab @@ -485,24 +474,21 @@ function(matlab_extract_all_installed_versions_from_registry win64 matlab_versio ) if(_reg) - string(REGEX MATCHALL "([0-9]+\\.[0-9]+)" _versions_regex "${_reg}") - foreach(match IN LISTS _versions_regex) - string(REGEX MATCH "([0-9]+\\.[0-9]+)" current_match "${match}") - - if(NOT CMAKE_MATCH_1) - continue() - endif() - - cmake_host_system_information(RESULT _reg - QUERY WINDOWS_REGISTRY "HKLM/SOFTWARE/Mathworks/${_installation_type}/${CMAKE_MATCH_1}" - VALUE "MATLABROOT" - ) - - _Matlab_VersionInfoXML("${_reg}" _matlab_version_tmp) - if(NOT "${_matlab_version_tmp}" STREQUAL "unknown") - list(APPEND matlabs_from_registry ${_matlab_version_tmp}) + foreach(_match IN LISTS _versions_regex) + if(_match MATCHES "([0-9]+\\.[0-9]+)") + cmake_host_system_information(RESULT _reg + QUERY WINDOWS_REGISTRY "HKLM/SOFTWARE/Mathworks/${_installation_type}/${CMAKE_MATCH_1}" + VALUE "MATLABROOT" + ) + + _Matlab_VersionInfoXML("${_reg}" _matlab_version_tmp) + if("${_matlab_version_tmp}" STREQUAL "unknown") + list(APPEND matlabs_from_registry ${_match}) + else() + list(APPEND matlabs_from_registry ${_matlab_version_tmp}) + endif() endif() endforeach() @@ -558,42 +544,58 @@ function(matlab_get_all_valid_matlab_roots_from_registry matlab_versions matlab_ # extract_matlab_versions_from_registry_brute_force or # matlab_extract_all_installed_versions_from_registry. + # only the major.minor version is used in Mathworks Windows Registry keys + list(TRANSFORM matlab_versions REPLACE "^([0-9]+\\.[0-9]+).*" "\\1") + set(_matlab_roots_list ) # check for Matlab installations foreach(_matlab_current_version IN LISTS matlab_versions) - get_filename_component( - current_MATLAB_ROOT - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\${_matlab_current_version};MATLABROOT]" - ABSOLUTE) + cmake_host_system_information(RESULT current_MATLAB_ROOT + QUERY WINDOWS_REGISTRY "HKLM/SOFTWARE/Mathworks/MATLAB/${_matlab_current_version}" + VALUE "MATLABROOT" + ) + cmake_path(CONVERT "${current_MATLAB_ROOT}" TO_CMAKE_PATH_LIST current_MATLAB_ROOT) if(IS_DIRECTORY "${current_MATLAB_ROOT}") - list(APPEND _matlab_roots_list "MATLAB" ${_matlab_current_version} ${current_MATLAB_ROOT}) + _Matlab_VersionInfoXML("${current_MATLAB_ROOT}" _matlab_version_tmp) + if("${_matlab_version_tmp}" STREQUAL "unknown") + list(APPEND _matlab_roots_list "MATLAB" ${_matlab_current_version} ${current_MATLAB_ROOT}) + else() + list(APPEND _matlab_roots_list "MATLAB" ${_matlab_version_tmp} ${current_MATLAB_ROOT}) + endif() endif() endforeach() # Check for MCR installations foreach(_matlab_current_version IN LISTS matlab_versions) - get_filename_component( - current_MATLAB_ROOT - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB Runtime\\${_matlab_current_version};MATLABROOT]" - ABSOLUTE) + cmake_host_system_information(RESULT current_MATLAB_ROOT + QUERY WINDOWS_REGISTRY "HKLM/SOFTWARE/Mathworks/MATLAB Runtime/${_matlab_current_version}" + VALUE "MATLABROOT" + ) + cmake_path(CONVERT "${current_MATLAB_ROOT}" TO_CMAKE_PATH_LIST current_MATLAB_ROOT) # remove the dot string(REPLACE "." "" _matlab_current_version_without_dot "${_matlab_current_version}") if(IS_DIRECTORY "${current_MATLAB_ROOT}") - list(APPEND _matlab_roots_list "MCR" ${_matlab_current_version} "${current_MATLAB_ROOT}/v${_matlab_current_version_without_dot}") + _Matlab_VersionInfoXML("${current_MATLAB_ROOT}" _matlab_version_tmp) + if("${_matlab_version_tmp}" STREQUAL "unknown") + list(APPEND _matlab_roots_list "MCR" ${_matlab_current_version} "${current_MATLAB_ROOT}/v${_matlab_current_version_without_dot}") + else() + list(APPEND _matlab_roots_list "MCR" ${_matlab_version_tmp} "${current_MATLAB_ROOT}/v${_matlab_current_version_without_dot}") + endif() endif() endforeach() # Check for old MCR installations foreach(_matlab_current_version IN LISTS matlab_versions) - get_filename_component( - current_MATLAB_ROOT - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB Compiler Runtime\\${_matlab_current_version};MATLABROOT]" - ABSOLUTE) + cmake_host_system_information(RESULT current_MATLAB_ROOT + QUERY WINDOWS_REGISTRY "HKLM/SOFTWARE/Mathworks/MATLAB Compiler Runtime/${_matlab_current_version}" + VALUE "MATLABROOT" + ) + cmake_path(CONVERT "${current_MATLAB_ROOT}" TO_CMAKE_PATH_LIST current_MATLAB_ROOT) # remove the dot string(REPLACE "." "" _matlab_current_version_without_dot "${_matlab_current_version}") @@ -1409,20 +1411,11 @@ function(_Matlab_VersionInfoXML matlab_root _version) set(_ver "unknown") set(_XMLfile ${matlab_root}/VersionInfo.xml) - if(NOT EXISTS ${_XMLfile}) - return() - endif() + if(EXISTS ${_XMLfile}) + file(READ ${_XMLfile} versioninfo_string) - file(READ ${_XMLfile} versioninfo_string) - - if(versioninfo_string) # parses "<version>23.2.0.2365128</version>" - string(REGEX MATCH "<version>([0-9]+(\\.[0-9]+)+)</version>" - version_reg_match - ${versioninfo_string} - ) - - if(CMAKE_MATCH_1) + if(versioninfo_string MATCHES "<version>([0-9]+(\\.[0-9]+)+)</version>") set(_ver "${CMAKE_MATCH_1}") endif() endif() diff --git a/Modules/FindX11.cmake b/Modules/FindX11.cmake index 1047e4f..491ea46 100644 --- a/Modules/FindX11.cmake +++ b/Modules/FindX11.cmake @@ -89,6 +89,7 @@ and also the following more fine grained variables and targets: X11_Xutil_INCLUDE_PATH, X11_Xutil_FOUND, X11::Xutil X11_Xv_INCLUDE_PATH, X11_Xv_LIB, X11_Xv_FOUND, X11::Xv X11_dpms_INCLUDE_PATH, (in X11_Xext_LIB), X11_dpms_FOUND + X11_Xdbe_INCLUDE_PATH, (in X11_Xext_LIB), X11_Xdbe_FOUND X11_XShm_INCLUDE_PATH, (in X11_Xext_LIB), X11_XShm_FOUND X11_Xshape_INCLUDE_PATH, (in X11_Xext_LIB), X11_Xshape_FOUND X11_XSync_INCLUDE_PATH, (in X11_Xext_LIB), X11_XSync_FOUND @@ -121,6 +122,10 @@ and also the following more fine grained variables and targets: ``xcb_shm``, ``xcb_sync``, ``xcb_xf86dri``, ``xcb_xinerama``, ``xcb_xinput``, ``xcb_xrm``, ``xcb_xvmc``, and ``xcb_xv`` libraries. +.. versionadded:: 3.29 + Added coverage of double buffer extension (variables + ``X11_Xdbe_INCLUDE_PATH`` and ``X11_Xdbe_FOUND``). + #]=======================================================================] if (UNIX) @@ -200,6 +205,7 @@ if (UNIX) find_path(X11_Xcomposite_INCLUDE_PATH X11/extensions/Xcomposite.h ${X11_INC_SEARCH_PATH}) find_path(X11_Xcursor_INCLUDE_PATH X11/Xcursor/Xcursor.h ${X11_INC_SEARCH_PATH}) find_path(X11_Xdamage_INCLUDE_PATH X11/extensions/Xdamage.h ${X11_INC_SEARCH_PATH}) + find_path(X11_Xdbe_INCLUDE_PATH X11/extensions/Xdbe.h ${X11_INC_SEARCH_PATH}) find_path(X11_Xdmcp_INCLUDE_PATH X11/Xdmcp.h ${X11_INC_SEARCH_PATH}) find_path(X11_Xext_INCLUDE_PATH X11/extensions/Xext.h ${X11_INC_SEARCH_PATH}) find_path(X11_dpms_INCLUDE_PATH X11/extensions/dpms.h ${X11_INC_SEARCH_PATH}) @@ -643,6 +649,11 @@ if (UNIX) set(X11_Xaw_FOUND TRUE) endif() + if (X11_Xdbe_INCLUDE_PATH) + set(X11_Xdbe_FOUND TRUE) + list(APPEND X11_INCLUDE_DIR ${X11_Xdbe_INCLUDE_PATH}) + endif () + # Most of the X11 headers will be in the same directories, avoid # creating a huge list of duplicates. if (X11_INCLUDE_DIR) @@ -1358,6 +1369,7 @@ if (UNIX) X11_XSync_INCLUDE_PATH X11_Xaw_LIB X11_Xaw_INCLUDE_PATH + X11_Xdbe_INCLUDE_PATH ) set(CMAKE_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK_SAVE}) set(CMAKE_REQUIRED_QUIET ${CMAKE_REQUIRED_QUIET_SAVE}) diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 8563abe..e05a279 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,7 +1,7 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 28) -set(CMake_VERSION_PATCH 20240115) +set(CMake_VERSION_PATCH 20240117) #set(CMake_VERSION_RC 0) set(CMake_VERSION_IS_DIRTY 0) diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index 40eb902..c985767 100644 --- a/Source/cmComputeLinkInformation.cxx +++ b/Source/cmComputeLinkInformation.cxx @@ -553,7 +553,8 @@ bool cmComputeLinkInformation::Compute() this->Target->GetType() == cmStateEnums::MODULE_LIBRARY || this->Target->GetType() == cmStateEnums::STATIC_LIBRARY || (this->Target->CanCompileSources() && - (this->Target->HaveCxx20ModuleSources() || + (this->Target->HaveCxxModuleSupport(this->Config) == + cmGeneratorTarget::Cxx20SupportLevel::Supported || this->Target->HaveFortranSources())))) { return false; } diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 9bc292c..45ed0ab 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -2362,6 +2362,8 @@ void cmNinjaTargetGenerator::ExportSwiftObjectCompileCommand( return this->LocalGenerator->ConvertToOutputFormat( srcFilename, cmOutputConverter::SHELL); }; + auto escapedModuleObjectFilename = + this->ConvertToNinjaPath(moduleObjectFilename); cmRulePlaceholderExpander::RuleVariables compileObjectVars; compileObjectVars.Language = "Swift"; @@ -2390,11 +2392,12 @@ void cmNinjaTargetGenerator::ExportSwiftObjectCompileCommand( for (cmSourceFile const* sf : moduleSourceFiles) { std::string const sourceFilename = this->GetCompiledSourceNinjaPath(sf); - std::string objectFilename = moduleObjectFilename; + std::string objectFilename = escapedModuleObjectFilename; if (!singleOutput) { // If it's not single-output, each source file gets a separate object - objectFilename = this->GetObjectFilePath(sf, outputConfig); + objectFilename = + this->ConvertToNinjaPath(this->GetObjectFilePath(sf, outputConfig)); } compileObjectVars.Objects = objectFilename.c_str(); diff --git a/Tests/RunCMake/CXXModules/RunCMakeTest.cmake b/Tests/RunCMake/CXXModules/RunCMakeTest.cmake index abede44..b0571ed 100644 --- a/Tests/RunCMake/CXXModules/RunCMakeTest.cmake +++ b/Tests/RunCMake/CXXModules/RunCMakeTest.cmake @@ -180,6 +180,7 @@ if ("named" IN_LIST CMake_TEST_MODULE_COMPILATION) run_cxx_module_test(non-trivial-collation-order-randomized) run_cxx_module_test(duplicate) set(RunCMake_CXXModules_NO_TEST 1) + run_cxx_module_test(import-from-object) run_cxx_module_test(circular) run_cxx_module_test(try-compile) run_cxx_module_test(try-run) diff --git a/Tests/RunCMake/CXXModules/examples/import-from-object/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/import-from-object/CMakeLists.txt new file mode 100644 index 0000000..e9ec809 --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/import-from-object/CMakeLists.txt @@ -0,0 +1,16 @@ +cmake_minimum_required(VERSION 3.24...3.28) +project(cxx_modules_import_from_object CXX) + +include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") + +set(CMAKE_CXX_STANDARD 20) + +add_library(a STATIC) +target_sources(a + PUBLIC + FILE_SET CXX_MODULES + FILES + object-a.cxx) + +add_library(b OBJECT object-b.cxx) +target_link_libraries(b PRIVATE a) diff --git a/Tests/RunCMake/CXXModules/examples/import-from-object/object-a.cxx b/Tests/RunCMake/CXXModules/examples/import-from-object/object-a.cxx new file mode 100644 index 0000000..9634a8f --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/import-from-object/object-a.cxx @@ -0,0 +1,2 @@ +module; +export module a; diff --git a/Tests/RunCMake/CXXModules/examples/import-from-object/object-b.cxx b/Tests/RunCMake/CXXModules/examples/import-from-object/object-b.cxx new file mode 100644 index 0000000..3b2a80c --- /dev/null +++ b/Tests/RunCMake/CXXModules/examples/import-from-object/object-b.cxx @@ -0,0 +1 @@ +import a; |