diff options
Diffstat (limited to 'Help/policy')
-rw-r--r-- | Help/policy/CMP0112.rst | 1 | ||||
-rw-r--r-- | Help/policy/CMP0130.rst | 32 | ||||
-rw-r--r-- | Help/policy/CMP0131.rst | 31 | ||||
-rw-r--r-- | Help/policy/CMP0132.rst | 26 | ||||
-rw-r--r-- | Help/policy/CMP0133.rst | 32 | ||||
-rw-r--r-- | Help/policy/CMP0134.rst | 39 | ||||
-rw-r--r-- | Help/policy/CMP0135.rst | 29 | ||||
-rw-r--r-- | Help/policy/CMP0136.rst | 50 | ||||
-rw-r--r-- | Help/policy/CMP0137.rst | 33 | ||||
-rw-r--r-- | Help/policy/CMP0138.rst | 31 | ||||
-rw-r--r-- | Help/policy/CMP0139.rst | 17 |
11 files changed, 321 insertions, 0 deletions
diff --git a/Help/policy/CMP0112.rst b/Help/policy/CMP0112.rst index 5b00d07..25c3896 100644 --- a/Help/policy/CMP0112.rst +++ b/Help/policy/CMP0112.rst @@ -18,6 +18,7 @@ file name components no longer add a dependency on the evaluated target. - ``TARGET_PDB_FILE_NAME`` - ``TARGET_PDB_FILE_DIR`` - ``TARGET_BUNDLE_DIR`` + - ``TARGET_BUNDLE_DIR_NAME`` - ``TARGET_BUNDLE_CONTENT_DIR`` diff --git a/Help/policy/CMP0130.rst b/Help/policy/CMP0130.rst new file mode 100644 index 0000000..0dd5623 --- /dev/null +++ b/Help/policy/CMP0130.rst @@ -0,0 +1,32 @@ +CMP0130 +------- + +.. versionadded:: 3.24 + +:command:`while` diagnoses condition evaluation errors. + +CMake 3.23 and below accidentally tolerated errors encountered while +evaluating the condition passed to the :command:`while` command +(but not the :command:`if` command). For example, the code + +.. code-block:: cmake + + set(paren "(") + while(${paren}) + endwhile() + +creates an unbalanced parenthesis during condition evaluation. + +CMake 3.24 and above prefer to diagnose such errors. This policy +provides compatibility for projects that have not been updated to +fix their condition errors. + +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. + +.. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0131.rst b/Help/policy/CMP0131.rst new file mode 100644 index 0000000..d5430e4 --- /dev/null +++ b/Help/policy/CMP0131.rst @@ -0,0 +1,31 @@ +CMP0131 +------- + +.. versionadded:: 3.24 + +:prop_tgt:`LINK_LIBRARIES` supports the :genex:`$<LINK_ONLY:...>` +generator expression. + +CMake 3.23 and below documented the :genex:`$<LINK_ONLY:...>` generator +expression only for use in :prop_tgt:`INTERFACE_LINK_LIBRARIES`. +When used in :prop_tgt:`LINK_LIBRARIES`, the content guarded inside +:genex:`$<LINK_ONLY:...>` was always used, even when collecting non-linking +usage requirements such as :prop_tgt:`INTERFACE_COMPILE_DEFINITIONS`. + +CMake 3.24 and above prefer to support :genex:`$<LINK_ONLY:...>`, when +used in :prop_tgt:`LINK_LIBRARIES`, by using the guarded content only +for link dependencies and not other usage requirements. This policy +provides compatibility for projects that have not been updated to +account for this change. + +The ``OLD`` behavior for this policy is to use :prop_tgt:`LINK_LIBRARIES` +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. + +.. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0132.rst b/Help/policy/CMP0132.rst new file mode 100644 index 0000000..fadbbdc --- /dev/null +++ b/Help/policy/CMP0132.rst @@ -0,0 +1,26 @@ +CMP0132 +------- + +.. versionadded:: 3.24 + +Apart from when using the Xcode generator and some Visual Studio generators, +CMake 3.23 and below will set environment variables like :envvar:`CC`, +:envvar:`CXX`, etc. when the corresponding language is enabled. +This only occurs on the very first time CMake is run in a build directory, +and the environment variables are only defined at configure time, not build +time. On subsequent CMake runs, these environment variables are not set, +opening up the opportunity for different behavior between the first and +subsequent CMake runs. CMake 3.24 and above prefer to not set these +environment variables when a language is enabled, even on the first run in +a build directory. + +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. + +.. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0133.rst b/Help/policy/CMP0133.rst new file mode 100644 index 0000000..c19bcf9 --- /dev/null +++ b/Help/policy/CMP0133.rst @@ -0,0 +1,32 @@ +CMP0133 +------- + +.. versionadded:: 3.24 + +The :module:`CPack` module disables SLA by default in the +:cpack_gen:`CPack DragNDrop Generator`. + +The :cpack_gen:`CPack DragNDrop Generator` in CMake 3.22 and below attach a +Software License Agreement (SLA) to ``.dmg`` files using the file specified +by :variable:`CPACK_RESOURCE_FILE_LICENSE`, if set to a non-default value. +macOS 12.0 deprecated the tools used to do this, so CMake 3.23 added +the :variable:`CPACK_DMG_SLA_USE_RESOURCE_FILE_LICENSE` option to +control the behavior. CMake 3.23 enables that option by default for +compatibility with older versions. CMake 3.24 and above prefer to *not* +enable the :variable:`CPACK_DMG_SLA_USE_RESOURCE_FILE_LICENSE` option by +default. This policy provides compatibility with projects that have not +been updated to account for the lack of a SLA in their ``.dmg`` packages. + +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. +See documentation of the +:variable:`CMAKE_POLICY_WARNING_CMP0133 <CMAKE_POLICY_WARNING_CMP<NNNN>>` +variable to control the warning. + +.. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0134.rst b/Help/policy/CMP0134.rst new file mode 100644 index 0000000..2b562bc --- /dev/null +++ b/Help/policy/CMP0134.rst @@ -0,0 +1,39 @@ +CMP0134 +------- + +.. versionadded:: 3.24 + +The default registry view is ``TARGET`` for the :command:`find_file`, +:command:`find_path`, :command:`find_library`, and :command:`find_package` +commands and ``BOTH`` for the :command:`find_program` command. + +The default registry views in CMake 3.23 and below are selected using the +following rules: + +* if :variable:`CMAKE_SIZEOF_VOID_P` has value ``8``: + + * Use view ``64`` for all ``find_*`` commands except :command:`find_program` + command. + * Use view ``64_32`` for :command:`find_program` command. + +* if :variable:`CMAKE_SIZEOF_VOID_P` has value ``4`` or is undefined: + + * Use view ``32`` for all ``find_*`` commands except :command:`find_program` + command. + * Use view ``32_64`` for :command:`find_program` command. + +The ``OLD`` behavior for this policy is to use registry views ``64`` and +``64_32`` or ``32_64`` and ``32`` as default, depending of +:variable:`CMAKE_SIZEOF_VOID_P` variable value. +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 +by default when this policy is not set and simply uses ``OLD`` behavior. +See documentation of the +:variable:`CMAKE_POLICY_WARNING_CMP0133 <CMAKE_POLICY_WARNING_CMP<NNNN>>` +variable to control the warning. + +.. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0135.rst b/Help/policy/CMP0135.rst new file mode 100644 index 0000000..1c0c134 --- /dev/null +++ b/Help/policy/CMP0135.rst @@ -0,0 +1,29 @@ +CMP0135 +------- + +.. versionadded:: 3.24 + +When using the ``URL`` download method with the :command:`ExternalProject_Add` +command, CMake 3.23 and below sets the timestamps of the extracted contents +to the same as the timestamps in the archive. When the ``URL`` changes, the +new archive is downloaded and extracted, but the timestamps of the extracted +contents might not be newer than the previous contents. Anything that depends +on the extracted contents might not be rebuilt, even though the contents may +change. + +CMake 3.24 and above prefers to set the timestamps of all extracted contents +to the time of the extraction. This ensures that anything that depends on the +extracted contents will be rebuilt whenever the ``URL`` changes. + +The ``DOWNLOAD_EXTRACT_TIMESTAMP`` option to the +:command:`ExternalProject_Add` command can be used to explicitly specify how +timestamps should be handled. When ``DOWNLOAD_EXTRACT_TIMESTAMP`` is not +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. + +.. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0136.rst b/Help/policy/CMP0136.rst new file mode 100644 index 0000000..5414278 --- /dev/null +++ b/Help/policy/CMP0136.rst @@ -0,0 +1,50 @@ +CMP0136 +------- + +.. versionadded:: 3.24 + +Watcom runtime library flags are selected by an abstraction. + +Compilers targeting the Watcom ABI have flags to select the Watcom runtime +library. + +In CMake 3.23 and below, Watcom runtime library selection flags are added to +the default :variable:`CMAKE_<LANG>_FLAGS_<CONFIG>` cache entries by CMake +automatically. This allows users to edit their cache entries to adjust the +flags. However, the presence of such default flags is problematic for +projects that want to choose a different runtime library programmatically. +In particular, it requires string editing of the +:variable:`CMAKE_<LANG>_FLAGS_<CONFIG>` variables with knowledge of the +CMake builtin defaults so they can be replaced. + +CMake 3.24 and above prefer to leave the Watcom runtime library selection flags +out of the default :variable:`CMAKE_<LANG>_FLAGS_<CONFIG>` values and instead +offer a first-class abstraction. The :variable:`CMAKE_WATCOM_RUNTIME_LIBRARY` +variable and :prop_tgt:`WATCOM_RUNTIME_LIBRARY` target property may be set to +select the Watcom runtime library. If they are not set then CMake uses the +default value ``MultiThreadedDLL`` on Windows and ``SingleThreaded`` on other +platforms, which is equivalent to the original flags. + +This policy provides compatibility with projects that have not been updated +to be aware of the abstraction. The policy setting takes effect as of the +first :command:`project` or :command:`enable_language` command that enables +a language whose compiler targets the Watcom ABI. + +.. note:: + + Once the policy has taken effect at the top of a project, that choice + must be used throughout the tree. In projects that have nested projects + in subdirectories, be sure to convert everything together. + +The ``OLD`` behavior for this policy is to place Watcom runtime library +flags in the default :variable:`CMAKE_<LANG>_FLAGS_<CONFIG>` cache +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. + +.. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0137.rst b/Help/policy/CMP0137.rst new file mode 100644 index 0000000..ba3cb9c --- /dev/null +++ b/Help/policy/CMP0137.rst @@ -0,0 +1,33 @@ +CMP0137 +------- + +.. versionadded:: 3.24 + +:command:`try_compile` passes platform variables in project mode. + +The :command:`try_compile` command :ref:`source file <Try Compiling Source +Files>` signature propagates CMake variables containing platform settings, +and those specified by the :variable:`CMAKE_TRY_COMPILE_PLATFORM_VARIABLES` +variable, into the generated test project. This helps the test project drive +the toolchain the same way the calling project will. In CMake 3.23 and below, +the :ref:`whole-project <Try Compiling Whole Projects>` signature does not +propagate platform variables automatically. CMake 3.24 and above prefer to +propagate platform variables in the :ref:`whole-project <Try Compiling Whole +Projects>` signature. This policy provides compatibility with projects that +have not been updated to expect the behavior. + +The ``OLD`` behavior for this policy is to not pass any additional variables to +the :ref:`whole-project <Try Compiling Whole Projects>` signature. +The ``NEW`` behavior for this policy is to pass the same variables that the +:ref:`source file <Try Compiling Source Files>` signature does. + +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. + +.. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0138.rst b/Help/policy/CMP0138.rst new file mode 100644 index 0000000..a86849d --- /dev/null +++ b/Help/policy/CMP0138.rst @@ -0,0 +1,31 @@ +CMP0138 +------- + +.. versionadded:: 3.24 + +:module:`CheckIPOSupported` uses flags from calling project. + +The :module:`CheckIPOSupported` module :command:`check_ipo_supported` +command compiles a test project to determine whether the toolchain +supports :prop_tgt:`INTERPROCEDURAL_OPTIMIZATION`. CMake 3.23 and +below run the check with the default values of the +:variable:`CMAKE_<LANG>_FLAGS` and :variable:`CMAKE_<LANG>_FLAGS_<CONFIG>` +variables for the current environment and toolchain settings. +However, some projects may modify these flag variables to add +flags that affect availability of the toolchain's IPO features. +CMake 3.24 and above prefer to honor the calling project's values +for these variables. This policy provides compatibility for projects +that have not been updated to expect this behavior. + +The ``OLD`` behavior for this policy is to ignore the calling +project's values of :variable:`CMAKE_<LANG>_FLAGS` and +:variable:`CMAKE_<LANG>_FLAGS_<CONFIG>`. The ``NEW`` behavior +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. + +.. include:: DEPRECATED.txt diff --git a/Help/policy/CMP0139.rst b/Help/policy/CMP0139.rst new file mode 100644 index 0000000..5a0f4f7 --- /dev/null +++ b/Help/policy/CMP0139.rst @@ -0,0 +1,17 @@ +CMP0139 +------- + +.. versionadded:: 3.24 + +The :command:`if` command supports path comparisons using ``PATH_EQUAL`` +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. + +.. include:: DEPRECATED.txt |