CMakeDetermineVSServicePack: Add policy to remove this module

It has been documented as deprecated since CMake 3.0.
This commit is contained in:
Brad King
2025-05-28 09:41:34 -04:00
parent 9ffbef62ca
commit 39da33ae81
16 changed files with 93 additions and 1 deletions

View File

@@ -98,6 +98,7 @@ Policies Introduced by CMake 4.1
.. toctree::
:maxdepth: 1
CMP0196: The CMakeDetermineVSServicePack module is removed. </policy/CMP0196>
CMP0195: Swift modules in build trees use the Swift module directory structure. </policy/CMP0195>
CMP0194: MSVC is not an assembler for language ASM. </policy/CMP0194>
CMP0193: GNUInstallDirs caches CMAKE_INSTALL_* with leading 'usr/' for install prefix '/'. </policy/CMP0193>

23
Help/policy/CMP0196.rst Normal file
View File

@@ -0,0 +1,23 @@
CMP0196
-------
.. versionadded:: 4.1
The :module:`CMakeDetermineVSServicePack` module is removed.
The ``CMakeDetermineVSServicePack`` module has long been superseded by
the :variable:`CMAKE_<LANG>_COMPILER_VERSION` variable, and the module
has been documented as deprecated since CMake 3.0. CMake 4.1 and above
prefer to not provide the module. This policy provides compatibility
for projects that have not been ported away from it.
The ``OLD`` behavior of this policy is for
``include(CMakeDetermineVSServicePack)`` to load the deprecated module.
The ``NEW`` behavior halts with a fatal error if anything tries to include
the module.
.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 4.1
.. |WARNS_OR_DOES_NOT_WARN| replace:: warns
.. include:: include/STANDARD_ADVICE.rst
.. include:: include/DEPRECATED.rst

View File

@@ -0,0 +1,6 @@
remove-CMakeDetermineVSServicePack
----------------------------------
* The :module`:CMakeDetermineVSServicePack` module has been deprecated
via policy :policy:`CMP0196`. Port projects to the
:variable:`CMAKE_<LANG>_COMPILER_VERSION` variable instead.