Bläddra i källkod

Merge topic 'post-rel-dev'

1b11f48741 Configure CMake itself with policies through CMake 3.26
ee80960f78 export: Increase maximum policy version in exported files to 3.26
9ba9b6c658 Add deprecation warnings for policies CMP0120 and below

Acked-by: Kitware Robot <[email protected]>
Tested-by: buildbot <[email protected]>
Merge-request: !8546
Brad King 2 år sedan
förälder
incheckning
8761cfa0bf
33 ändrade filer med 309 tillägg och 27 borttagningar
  1. 1 1
      CMakeLists.txt
  2. 1 1
      Source/Checks/Curses/CMakeLists.txt
  3. 2 2
      Source/cmExportFileGenerator.cxx
  4. 1 1
      Source/cmMakefile.cxx
  5. 10 1
      Tests/RunCMake/CMP0115/CMP0115-OLD-stderr.txt
  6. 12 1
      Tests/RunCMake/CMP0116/CMP0116-Mixed-stderr.txt
  7. 8 0
      Tests/RunCMake/CMP0116/CMP0116-OLD-NOWARN-stderr.txt
  8. 8 0
      Tests/RunCMake/CMP0116/CMP0116-OLD-WARN-stderr.txt
  9. 12 1
      Tests/RunCMake/CMP0118/CMP0118-OLD-Test1-stderr.txt
  10. 12 1
      Tests/RunCMake/CMP0118/CMP0118-OLD-Test10-stderr.txt
  11. 12 1
      Tests/RunCMake/CMP0118/CMP0118-OLD-Test11-stderr.txt
  12. 12 1
      Tests/RunCMake/CMP0118/CMP0118-OLD-Test12-stderr.txt
  13. 12 1
      Tests/RunCMake/CMP0118/CMP0118-OLD-Test13-stderr.txt
  14. 12 1
      Tests/RunCMake/CMP0118/CMP0118-OLD-Test14-stderr.txt
  15. 12 1
      Tests/RunCMake/CMP0118/CMP0118-OLD-Test15-stderr.txt
  16. 12 1
      Tests/RunCMake/CMP0118/CMP0118-OLD-Test2-stderr.txt
  17. 12 1
      Tests/RunCMake/CMP0118/CMP0118-OLD-Test3-stderr.txt
  18. 12 1
      Tests/RunCMake/CMP0118/CMP0118-OLD-Test3b-stderr.txt
  19. 12 1
      Tests/RunCMake/CMP0118/CMP0118-OLD-Test4-stderr.txt
  20. 12 1
      Tests/RunCMake/CMP0118/CMP0118-OLD-Test4b-stderr.txt
  21. 12 1
      Tests/RunCMake/CMP0118/CMP0118-OLD-Test5-stderr.txt
  22. 12 1
      Tests/RunCMake/CMP0118/CMP0118-OLD-Test6-stderr.txt
  23. 12 1
      Tests/RunCMake/CMP0118/CMP0118-OLD-Test7-stderr.txt
  24. 12 1
      Tests/RunCMake/CMP0118/CMP0118-OLD-Test8-stderr.txt
  25. 12 1
      Tests/RunCMake/CMP0118/CMP0118-OLD-Test9-stderr.txt
  26. 12 1
      Tests/RunCMake/CMP0118/GenInSubdir-OLD-stderr.txt
  27. 10 0
      Tests/RunCMake/CMP0119/CMP0119-OLD-stderr.txt
  28. 10 0
      Tests/RunCMake/MSVCRuntimeTypeInfo/CMP0117-OLD-stderr.txt
  29. 8 0
      Tests/RunCMake/Ninja/QtAutoMocDeps-stderr.txt
  30. 10 0
      Tests/RunCMake/WriteCompilerDetectionHeader/CMP0120-OLD-Direct-stderr.txt
  31. 10 0
      Tests/RunCMake/WriteCompilerDetectionHeader/CMP0120-OLD-stderr.txt
  32. 1 1
      Utilities/Doxygen/CMakeLists.txt
  33. 1 1
      Utilities/Sphinx/CMakeLists.txt

+ 1 - 1
CMakeLists.txt

@@ -1,7 +1,7 @@
 # Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
 # file Copyright.txt or https://cmake.org/licensing for details.
 
-cmake_minimum_required(VERSION 3.13...3.25 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.13...3.26 FATAL_ERROR)
 set(CMAKE_USER_MAKE_RULES_OVERRIDE_C ${CMAKE_CURRENT_SOURCE_DIR}/Source/Modules/OverrideC.cmake)
 set(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX ${CMAKE_CURRENT_SOURCE_DIR}/Source/Modules/OverrideCXX.cmake)
 

+ 1 - 1
Source/Checks/Curses/CMakeLists.txt

@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.13...3.24 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.13...3.26 FATAL_ERROR)
 project(CheckCurses C)
 
 set(CURSES_NEED_NCURSES TRUE)

+ 2 - 2
Source/cmExportFileGenerator.cxx

@@ -955,13 +955,13 @@ void cmExportFileGenerator::GeneratePolicyHeaderCode(std::ostream& os)
 
   // Isolate the file policy level.
   // Support CMake versions as far back as 2.6 but also support using NEW
-  // policy settings for up to CMake 3.25 (this upper limit may be reviewed
+  // policy settings for up to CMake 3.26 (this upper limit may be reviewed
   // and increased from time to time). This reduces the opportunity for CMake
   // warnings when an older export file is later used with newer CMake
   // versions.
   /* clang-format off */
   os << "cmake_policy(PUSH)\n"
-     << "cmake_policy(VERSION 2.8.3...3.25)\n";
+     << "cmake_policy(VERSION 2.8.3...3.26)\n";
   /* clang-format on */
 }
 

+ 1 - 1
Source/cmMakefile.cxx

@@ -4613,7 +4613,7 @@ bool cmMakefile::SetPolicy(cmPolicies::PolicyID id,
   }
 
   // Deprecate old policies.
-  if (status == cmPolicies::OLD && id <= cmPolicies::CMP0114 &&
+  if (status == cmPolicies::OLD && id <= cmPolicies::CMP0120 &&
       !(this->GetCMakeInstance()->GetIsInTryCompile() &&
         (
           // Policies set by cmCoreTryCompile::TryCompileCode.

+ 10 - 1
Tests/RunCMake/CMP0115/CMP0115-OLD-stderr.txt

@@ -1,4 +1,13 @@
-^CMake Error at CMP0115\.cmake:[0-9]+ \(add_executable\):
+^CMake Deprecation Warning at CMakeLists\.txt:[0-9]+ \(cmake_minimum_required\):
+  The OLD behavior for policy CMP0115 will be removed from a future version
+  of CMake\.
+
+  The cmake-policies\(7\) manual explains that the OLD behaviors of all
+  policies are deprecated and that a policy should be set to OLD only under
+  specific short-term circumstances\.  Projects should be ported to the NEW
+  behavior and not rely on setting a policy to OLD\.
++
+CMake Error at CMP0115\.cmake:[0-9]+ \(add_executable\):
   Cannot find source file:
 
     noexist

+ 12 - 1
Tests/RunCMake/CMP0116/CMP0116-Mixed-stderr.txt

@@ -1,4 +1,15 @@
-^CMake Warning \(dev\) at CMP0116-Mixed\.cmake:1 \(add_custom_command\):
+^CMake Deprecation Warning at CMP0116-Mixed\.cmake:[0-9]+ \(cmake_policy\):
+  The OLD behavior for policy CMP0116 will be removed from a future version
+  of CMake\.
+
+  The cmake-policies\(7\) manual explains that the OLD behaviors of all
+  policies are deprecated and that a policy should be set to OLD only under
+  specific short-term circumstances\.  Projects should be ported to the NEW
+  behavior and not rely on setting a policy to OLD\.
+Call Stack \(most recent call first\):
+  CMakeLists\.txt:[0-9]+ \(include\)
++
+CMake Warning \(dev\) at CMP0116-Mixed\.cmake:1 \(add_custom_command\):
   Policy CMP0116 is not set: Ninja generators transform DEPFILEs from
   add_custom_command\(\)\.  Run "cmake --help-policy CMP0116" for policy
   details\.  Use the cmake_policy command to set the policy and suppress this

+ 8 - 0
Tests/RunCMake/CMP0116/CMP0116-OLD-NOWARN-stderr.txt

@@ -0,0 +1,8 @@
+^CMake Deprecation Warning at CMakeLists\.txt:[0-9]+ \(cmake_minimum_required\):
+  The OLD behavior for policy CMP0116 will be removed from a future version
+  of CMake\.
+
+  The cmake-policies\(7\) manual explains that the OLD behaviors of all
+  policies are deprecated and that a policy should be set to OLD only under
+  specific short-term circumstances\.  Projects should be ported to the NEW
+  behavior and not rely on setting a policy to OLD\.$

+ 8 - 0
Tests/RunCMake/CMP0116/CMP0116-OLD-WARN-stderr.txt

@@ -0,0 +1,8 @@
+^CMake Deprecation Warning at CMakeLists\.txt:[0-9]+ \(cmake_minimum_required\):
+  The OLD behavior for policy CMP0116 will be removed from a future version
+  of CMake\.
+
+  The cmake-policies\(7\) manual explains that the OLD behaviors of all
+  policies are deprecated and that a policy should be set to OLD only under
+  specific short-term circumstances\.  Projects should be ported to the NEW
+  behavior and not rely on setting a policy to OLD\.$

+ 12 - 1
Tests/RunCMake/CMP0118/CMP0118-OLD-Test1-stderr.txt

@@ -1,4 +1,15 @@
-^prop: `0`
+^CMake Deprecation Warning at CMP0118-OLD-Test1\.cmake:[0-9]+ \(cmake_policy\):
+  The OLD behavior for policy CMP0118 will be removed from a future version
+  of CMake\.
+
+  The cmake-policies\(7\) manual explains that the OLD behaviors of all
+  policies are deprecated and that a policy should be set to OLD only under
+  specific short-term circumstances\.  Projects should be ported to the NEW
+  behavior and not rely on setting a policy to OLD\.
+Call Stack \(most recent call first\):
+  CMakeLists\.txt:[0-9]+ \(include\)
++
+prop: `0`
 CMake Error at CMP0118-Common-Test1\.cmake:[0-9]+ \(target_sources\):
   Cannot find source file:
 

+ 12 - 1
Tests/RunCMake/CMP0118/CMP0118-OLD-Test10-stderr.txt

@@ -1,4 +1,15 @@
-^Generated_source0\.txt: # 1a # GENERATED = `1`
+^CMake Deprecation Warning at CMP0118-OLD-Test10\.cmake:[0-9]+ \(cmake_policy\):
+  The OLD behavior for policy CMP0118 will be removed from a future version
+  of CMake\.
+
+  The cmake-policies\(7\) manual explains that the OLD behaviors of all
+  policies are deprecated and that a policy should be set to OLD only under
+  specific short-term circumstances\.  Projects should be ported to the NEW
+  behavior and not rely on setting a policy to OLD\.
+Call Stack \(most recent call first\):
+  CMakeLists\.txt:[0-9]+ \(include\)
++
+Generated_source0\.txt: # 1a # GENERATED = `1`
 Generated_source0\.txt: # 1b # GENERATED = `1`
 Generated_source0\.txt: # 2a # GENERATED = `1`
 Generated_source0\.txt: # 2b # GENERATED = `1`

+ 12 - 1
Tests/RunCMake/CMP0118/CMP0118-OLD-Test11-stderr.txt

@@ -1,4 +1,15 @@
-^Generated_source0\.txt: # 1a # GENERATED = `1`
+^CMake Deprecation Warning at CMP0118-OLD-Test11\.cmake:[0-9]+ \(cmake_policy\):
+  The OLD behavior for policy CMP0118 will be removed from a future version
+  of CMake\.
+
+  The cmake-policies\(7\) manual explains that the OLD behaviors of all
+  policies are deprecated and that a policy should be set to OLD only under
+  specific short-term circumstances\.  Projects should be ported to the NEW
+  behavior and not rely on setting a policy to OLD\.
+Call Stack \(most recent call first\):
+  CMakeLists\.txt:[0-9]+ \(include\)
++
+Generated_source0\.txt: # 1a # GENERATED = `1`
 Generated_source0\.txt: # 1b # GENERATED = `1`
 Generated_source0\.txt: # 2a # GENERATED = `1`
 Generated_source0\.txt: # 2b # GENERATED = `1`

+ 12 - 1
Tests/RunCMake/CMP0118/CMP0118-OLD-Test12-stderr.txt

@@ -1,4 +1,15 @@
-^CMake Error at subdir-Common-Test12/CMakeLists\.txt:[0-9]+ \(add_custom_command\):
+^CMake Deprecation Warning at CMP0118-OLD-Test12\.cmake:[0-9]+ \(cmake_policy\):
+  The OLD behavior for policy CMP0118 will be removed from a future version
+  of CMake\.
+
+  The cmake-policies\(7\) manual explains that the OLD behaviors of all
+  policies are deprecated and that a policy should be set to OLD only under
+  specific short-term circumstances\.  Projects should be ported to the NEW
+  behavior and not rely on setting a policy to OLD\.
+Call Stack \(most recent call first\):
+  CMakeLists\.txt:[0-9]+ \(include\)
++
+CMake Error at subdir-Common-Test12/CMakeLists\.txt:[0-9]+ \(add_custom_command\):
   TARGET 'custom[4-6]' was not created in this directory\.
 +
 CMake Error at subdir-Common-Test12/CMakeLists\.txt:[0-9]+ \(add_custom_command\):

+ 12 - 1
Tests/RunCMake/CMP0118/CMP0118-OLD-Test13-stderr.txt

@@ -1,4 +1,15 @@
-^CMake Error at subdir-Common-Test13/CMakeLists\.txt:[0-9]+ \(add_custom_command\):
+^CMake Deprecation Warning at CMP0118-OLD-Test13\.cmake:[0-9]+ \(cmake_policy\):
+  The OLD behavior for policy CMP0118 will be removed from a future version
+  of CMake\.
+
+  The cmake-policies\(7\) manual explains that the OLD behaviors of all
+  policies are deprecated and that a policy should be set to OLD only under
+  specific short-term circumstances\.  Projects should be ported to the NEW
+  behavior and not rely on setting a policy to OLD\.
+Call Stack \(most recent call first\):
+  CMakeLists\.txt:[0-9]+ \(include\)
++
+CMake Error at subdir-Common-Test13/CMakeLists\.txt:[0-9]+ \(add_custom_command\):
   TARGET 'custom[4-6]' was not created in this directory\.
 +
 CMake Error at subdir-Common-Test13/CMakeLists\.txt:[0-9]+ \(add_custom_command\):

+ 12 - 1
Tests/RunCMake/CMP0118/CMP0118-OLD-Test14-stderr.txt

@@ -1,4 +1,15 @@
-^Generated_source0\.txt: # 1a # GENERATED = `1`
+^CMake Deprecation Warning at CMP0118-OLD-Test14\.cmake:[0-9]+ \(cmake_policy\):
+  The OLD behavior for policy CMP0118 will be removed from a future version
+  of CMake\.
+
+  The cmake-policies\(7\) manual explains that the OLD behaviors of all
+  policies are deprecated and that a policy should be set to OLD only under
+  specific short-term circumstances\.  Projects should be ported to the NEW
+  behavior and not rely on setting a policy to OLD\.
+Call Stack \(most recent call first\):
+  CMakeLists\.txt:[0-9]+ \(include\)
++
+Generated_source0\.txt: # 1a # GENERATED = `1`
 Generated_source0\.txt: # 1b # GENERATED = `1`
 Generated_source0\.txt: # 2a # GENERATED = `1`
 Generated_source0\.txt: # 2b # GENERATED = `1`

+ 12 - 1
Tests/RunCMake/CMP0118/CMP0118-OLD-Test15-stderr.txt

@@ -1,4 +1,15 @@
-^Generated_source0\.txt: # 1a # GENERATED = `1`
+^CMake Deprecation Warning at CMP0118-OLD-Test15\.cmake:[0-9]+ \(cmake_policy\):
+  The OLD behavior for policy CMP0118 will be removed from a future version
+  of CMake\.
+
+  The cmake-policies\(7\) manual explains that the OLD behaviors of all
+  policies are deprecated and that a policy should be set to OLD only under
+  specific short-term circumstances\.  Projects should be ported to the NEW
+  behavior and not rely on setting a policy to OLD\.
+Call Stack \(most recent call first\):
+  CMakeLists\.txt:[0-9]+ \(include\)
++
+Generated_source0\.txt: # 1a # GENERATED = `1`
 Generated_source0\.txt: # 1b # GENERATED = `1`
 Generated_source0\.txt: # 2a # GENERATED = `1`
 Generated_source0\.txt: # 2b # GENERATED = `1`

+ 12 - 1
Tests/RunCMake/CMP0118/CMP0118-OLD-Test2-stderr.txt

@@ -1 +1,12 @@
-^prop: `1`$
+^CMake Deprecation Warning at CMP0118-OLD-Test2\.cmake:[0-9]+ \(cmake_policy\):
+  The OLD behavior for policy CMP0118 will be removed from a future version
+  of CMake\.
+
+  The cmake-policies\(7\) manual explains that the OLD behaviors of all
+  policies are deprecated and that a policy should be set to OLD only under
+  specific short-term circumstances\.  Projects should be ported to the NEW
+  behavior and not rely on setting a policy to OLD\.
+Call Stack \(most recent call first\):
+  CMakeLists\.txt:[0-9]+ \(include\)
++
+prop: `1`$

+ 12 - 1
Tests/RunCMake/CMP0118/CMP0118-OLD-Test3-stderr.txt

@@ -1,4 +1,15 @@
-^Generated_with_full_path1\.txt: # 1a # GENERATED = `1`
+^CMake Deprecation Warning at CMP0118-OLD-Test3\.cmake:[0-9]+ \(cmake_policy\):
+  The OLD behavior for policy CMP0118 will be removed from a future version
+  of CMake\.
+
+  The cmake-policies\(7\) manual explains that the OLD behaviors of all
+  policies are deprecated and that a policy should be set to OLD only under
+  specific short-term circumstances\.  Projects should be ported to the NEW
+  behavior and not rely on setting a policy to OLD\.
+Call Stack \(most recent call first\):
+  CMakeLists\.txt:[0-9]+ \(include\)
++
+Generated_with_full_path1\.txt: # 1a # GENERATED = `1`
 Generated_with_full_path1\.txt: # 1b # GENERATED = `1`
 Generated_with_full_path1\.txt: # 2a # GENERATED = `1`
 Generated_with_full_path1\.txt: # 2b # GENERATED = `1`

+ 12 - 1
Tests/RunCMake/CMP0118/CMP0118-OLD-Test3b-stderr.txt

@@ -1,4 +1,15 @@
-^Generated_with_full_path1\.txt: # 1a # GENERATED = `1`
+^CMake Deprecation Warning at CMP0118-OLD-Test3b\.cmake:[0-9]+ \(cmake_policy\):
+  The OLD behavior for policy CMP0118 will be removed from a future version
+  of CMake\.
+
+  The cmake-policies\(7\) manual explains that the OLD behaviors of all
+  policies are deprecated and that a policy should be set to OLD only under
+  specific short-term circumstances\.  Projects should be ported to the NEW
+  behavior and not rely on setting a policy to OLD\.
+Call Stack \(most recent call first\):
+  CMakeLists\.txt:[0-9]+ \(include\)
++
+Generated_with_full_path1\.txt: # 1a # GENERATED = `1`
 Generated_with_full_path1\.txt: # 1b # GENERATED = `1`
 Generated_with_full_path1\.txt: # 2a # GENERATED = `1`
 Generated_with_full_path1\.txt: # 2b # GENERATED = `1`

+ 12 - 1
Tests/RunCMake/CMP0118/CMP0118-OLD-Test4-stderr.txt

@@ -1,4 +1,15 @@
-^Generated_with_full_path1\.txt: # 1a # GENERATED = `0`
+^CMake Deprecation Warning at CMP0118-OLD-Test4\.cmake:[0-9]+ \(cmake_policy\):
+  The OLD behavior for policy CMP0118 will be removed from a future version
+  of CMake\.
+
+  The cmake-policies\(7\) manual explains that the OLD behaviors of all
+  policies are deprecated and that a policy should be set to OLD only under
+  specific short-term circumstances\.  Projects should be ported to the NEW
+  behavior and not rely on setting a policy to OLD\.
+Call Stack \(most recent call first\):
+  CMakeLists\.txt:[0-9]+ \(include\)
++
+Generated_with_full_path1\.txt: # 1a # GENERATED = `0`
 Generated_with_full_path1\.txt: # 1b # GENERATED = `0`
 Generated_with_full_path1\.txt: # 2a # GENERATED = `0`
 Generated_with_full_path1\.txt: # 2b # GENERATED = `0`

+ 12 - 1
Tests/RunCMake/CMP0118/CMP0118-OLD-Test4b-stderr.txt

@@ -1,4 +1,15 @@
-^Generated_with_full_path1\.txt: # 1a # GENERATED = `0`
+^CMake Deprecation Warning at CMP0118-OLD-Test4b\.cmake:[0-9]+ \(cmake_policy\):
+  The OLD behavior for policy CMP0118 will be removed from a future version
+  of CMake\.
+
+  The cmake-policies\(7\) manual explains that the OLD behaviors of all
+  policies are deprecated and that a policy should be set to OLD only under
+  specific short-term circumstances\.  Projects should be ported to the NEW
+  behavior and not rely on setting a policy to OLD\.
+Call Stack \(most recent call first\):
+  CMakeLists\.txt:[0-9]+ \(include\)
++
+Generated_with_full_path1\.txt: # 1a # GENERATED = `0`
 Generated_with_full_path1\.txt: # 1b # GENERATED = `0`
 Generated_with_full_path1\.txt: # 2a # GENERATED = `0`
 Generated_with_full_path1\.txt: # 2b # GENERATED = `0`

+ 12 - 1
Tests/RunCMake/CMP0118/CMP0118-OLD-Test5-stderr.txt

@@ -1,4 +1,15 @@
-^Generated_with_full_path1\.txt: # 1a # GENERATED = `1`
+^CMake Deprecation Warning at CMP0118-OLD-Test5\.cmake:[0-9]+ \(cmake_policy\):
+  The OLD behavior for policy CMP0118 will be removed from a future version
+  of CMake\.
+
+  The cmake-policies\(7\) manual explains that the OLD behaviors of all
+  policies are deprecated and that a policy should be set to OLD only under
+  specific short-term circumstances\.  Projects should be ported to the NEW
+  behavior and not rely on setting a policy to OLD\.
+Call Stack \(most recent call first\):
+  CMakeLists\.txt:[0-9]+ \(include\)
++
+Generated_with_full_path1\.txt: # 1a # GENERATED = `1`
 Generated_with_full_path1\.txt: # 1b # GENERATED = `1`
 Generated_with_full_path1\.txt: # 2a # GENERATED = `1`
 Generated_with_full_path1\.txt: # 2b # GENERATED = `1`

+ 12 - 1
Tests/RunCMake/CMP0118/CMP0118-OLD-Test6-stderr.txt

@@ -1,4 +1,15 @@
-^Generated_source1\.txt: # 1a # GENERATED = `1`
+^CMake Deprecation Warning at CMP0118-OLD-Test6\.cmake:[0-9]+ \(cmake_policy\):
+  The OLD behavior for policy CMP0118 will be removed from a future version
+  of CMake\.
+
+  The cmake-policies\(7\) manual explains that the OLD behaviors of all
+  policies are deprecated and that a policy should be set to OLD only under
+  specific short-term circumstances\.  Projects should be ported to the NEW
+  behavior and not rely on setting a policy to OLD\.
+Call Stack \(most recent call first\):
+  CMakeLists\.txt:[0-9]+ \(include\)
++
+Generated_source1\.txt: # 1a # GENERATED = `1`
 Generated_source1\.txt: # 1b # GENERATED = `1`
 Generated_source1\.txt: # 2a # GENERATED = `1`
 Generated_source1\.txt: # 2b # GENERATED = `1`

+ 12 - 1
Tests/RunCMake/CMP0118/CMP0118-OLD-Test7-stderr.txt

@@ -1,4 +1,15 @@
-^Generated_source1\.txt: # 1a # GENERATED = `1`
+^CMake Deprecation Warning at CMP0118-OLD-Test7\.cmake:[0-9]+ \(cmake_policy\):
+  The OLD behavior for policy CMP0118 will be removed from a future version
+  of CMake\.
+
+  The cmake-policies\(7\) manual explains that the OLD behaviors of all
+  policies are deprecated and that a policy should be set to OLD only under
+  specific short-term circumstances\.  Projects should be ported to the NEW
+  behavior and not rely on setting a policy to OLD\.
+Call Stack \(most recent call first\):
+  CMakeLists\.txt:[0-9]+ \(include\)
++
+Generated_source1\.txt: # 1a # GENERATED = `1`
 Generated_source1\.txt: # 1b # GENERATED = `1`
 Generated_source1\.txt: # 2a # GENERATED = `1`
 Generated_source1\.txt: # 2b # GENERATED = `1`

+ 12 - 1
Tests/RunCMake/CMP0118/CMP0118-OLD-Test8-stderr.txt

@@ -1,4 +1,15 @@
-^Generated_source1\.txt: # 1a # GENERATED = `0`
+^CMake Deprecation Warning at CMP0118-OLD-Test8\.cmake:[0-9]+ \(cmake_policy\):
+  The OLD behavior for policy CMP0118 will be removed from a future version
+  of CMake\.
+
+  The cmake-policies\(7\) manual explains that the OLD behaviors of all
+  policies are deprecated and that a policy should be set to OLD only under
+  specific short-term circumstances\.  Projects should be ported to the NEW
+  behavior and not rely on setting a policy to OLD\.
+Call Stack \(most recent call first\):
+  CMakeLists\.txt:[0-9]+ \(include\)
++
+Generated_source1\.txt: # 1a # GENERATED = `0`
 Generated_source1\.txt: # 1b # GENERATED = `0`
 Generated_source1\.txt: # 2a # GENERATED = `0`
 Generated_source1\.txt: # 2b # GENERATED = `0`

+ 12 - 1
Tests/RunCMake/CMP0118/CMP0118-OLD-Test9-stderr.txt

@@ -1,4 +1,15 @@
-^Generated_source1\.txt: # 1a # GENERATED = `0`
+^CMake Deprecation Warning at CMP0118-OLD-Test9\.cmake:[0-9]+ \(cmake_policy\):
+  The OLD behavior for policy CMP0118 will be removed from a future version
+  of CMake\.
+
+  The cmake-policies\(7\) manual explains that the OLD behaviors of all
+  policies are deprecated and that a policy should be set to OLD only under
+  specific short-term circumstances\.  Projects should be ported to the NEW
+  behavior and not rely on setting a policy to OLD\.
+Call Stack \(most recent call first\):
+  CMakeLists\.txt:[0-9]+ \(include\)
++
+Generated_source1\.txt: # 1a # GENERATED = `0`
 Generated_source1\.txt: # 1b # GENERATED = `0`
 Generated_source1\.txt: # 2a # GENERATED = `0`
 Generated_source1\.txt: # 2b # GENERATED = `0`

+ 12 - 1
Tests/RunCMake/CMP0118/GenInSubdir-OLD-stderr.txt

@@ -1,4 +1,15 @@
-^CMake Error at GenInSubdir/CMakeLists\.txt:[0-9]+ \(target_sources\):
+^CMake Deprecation Warning at GenInSubdir-OLD\.cmake:[0-9]+ \(cmake_policy\):
+  The OLD behavior for policy CMP0118 will be removed from a future version
+  of CMake\.
+
+  The cmake-policies\(7\) manual explains that the OLD behaviors of all
+  policies are deprecated and that a policy should be set to OLD only under
+  specific short-term circumstances\.  Projects should be ported to the NEW
+  behavior and not rely on setting a policy to OLD\.
+Call Stack \(most recent call first\):
+  CMakeLists\.txt:[0-9]+ \(include\)
++
+CMake Error at GenInSubdir/CMakeLists\.txt:[0-9]+ \(target_sources\):
   Cannot find source file:
 
     [^

+ 10 - 0
Tests/RunCMake/CMP0119/CMP0119-OLD-stderr.txt

@@ -0,0 +1,10 @@
+^CMake Deprecation Warning at CMP0119-OLD\.cmake:[0-9]+ \(cmake_policy\):
+  The OLD behavior for policy CMP0119 will be removed from a future version
+  of CMake\.
+
+  The cmake-policies\(7\) manual explains that the OLD behaviors of all
+  policies are deprecated and that a policy should be set to OLD only under
+  specific short-term circumstances\.  Projects should be ported to the NEW
+  behavior and not rely on setting a policy to OLD\.
+Call Stack \(most recent call first\):
+  CMakeLists\.txt:[0-9]+ \(include\)$

+ 10 - 0
Tests/RunCMake/MSVCRuntimeTypeInfo/CMP0117-OLD-stderr.txt

@@ -0,0 +1,10 @@
+^CMake Deprecation Warning at CMP0117-OLD\.cmake:[0-9]+ \(cmake_policy\):
+  The OLD behavior for policy CMP0117 will be removed from a future version
+  of CMake\.
+
+  The cmake-policies\(7\) manual explains that the OLD behaviors of all
+  policies are deprecated and that a policy should be set to OLD only under
+  specific short-term circumstances\.  Projects should be ported to the NEW
+  behavior and not rely on setting a policy to OLD\.
+Call Stack \(most recent call first\):
+  CMakeLists\.txt:[0-9]+ \(include\)$

+ 8 - 0
Tests/RunCMake/Ninja/QtAutoMocDeps-stderr.txt

@@ -0,0 +1,8 @@
+^CMake Deprecation Warning at QtSubDir1/CMakeLists\.txt:[0-9]+ \(cmake_policy\):
+  The OLD behavior for policy CMP0116 will be removed from a future version
+  of CMake\.
+
+  The cmake-policies\(7\) manual explains that the OLD behaviors of all
+  policies are deprecated and that a policy should be set to OLD only under
+  specific short-term circumstances\.  Projects should be ported to the NEW
+  behavior and not rely on setting a policy to OLD\.$

+ 10 - 0
Tests/RunCMake/WriteCompilerDetectionHeader/CMP0120-OLD-Direct-stderr.txt

@@ -0,0 +1,10 @@
+^CMake Deprecation Warning at CMP0120-OLD-Direct\.cmake:[0-9]+ \(cmake_policy\):
+  The OLD behavior for policy CMP0120 will be removed from a future version
+  of CMake\.
+
+  The cmake-policies\(7\) manual explains that the OLD behaviors of all
+  policies are deprecated and that a policy should be set to OLD only under
+  specific short-term circumstances\.  Projects should be ported to the NEW
+  behavior and not rely on setting a policy to OLD\.
+Call Stack \(most recent call first\):
+  CMakeLists\.txt:[0-9]+ \(include\)$

+ 10 - 0
Tests/RunCMake/WriteCompilerDetectionHeader/CMP0120-OLD-stderr.txt

@@ -0,0 +1,10 @@
+^CMake Deprecation Warning at CMP0120-OLD\.cmake:[0-9]+ \(cmake_policy\):
+  The OLD behavior for policy CMP0120 will be removed from a future version
+  of CMake\.
+
+  The cmake-policies\(7\) manual explains that the OLD behaviors of all
+  policies are deprecated and that a policy should be set to OLD only under
+  specific short-term circumstances\.  Projects should be ported to the NEW
+  behavior and not rely on setting a policy to OLD\.
+Call Stack \(most recent call first\):
+  CMakeLists\.txt:[0-9]+ \(include\)$

+ 1 - 1
Utilities/Doxygen/CMakeLists.txt

@@ -3,7 +3,7 @@
 
 if(NOT CMake_SOURCE_DIR)
   set(CMakeDeveloperReference_STANDALONE 1)
-  cmake_minimum_required(VERSION 3.13...3.25 FATAL_ERROR)
+  cmake_minimum_required(VERSION 3.13...3.26 FATAL_ERROR)
   get_filename_component(tmp "${CMAKE_CURRENT_SOURCE_DIR}" PATH)
   get_filename_component(CMake_SOURCE_DIR "${tmp}" PATH)
   include(${CMake_SOURCE_DIR}/Modules/CTestUseLaunchers.cmake)

+ 1 - 1
Utilities/Sphinx/CMakeLists.txt

@@ -3,7 +3,7 @@
 
 if(NOT CMake_SOURCE_DIR)
   set(CMakeHelp_STANDALONE 1)
-  cmake_minimum_required(VERSION 3.13...3.25 FATAL_ERROR)
+  cmake_minimum_required(VERSION 3.13...3.26 FATAL_ERROR)
   get_filename_component(tmp "${CMAKE_CURRENT_SOURCE_DIR}" PATH)
   get_filename_component(CMake_SOURCE_DIR "${tmp}" PATH)
   include(${CMake_SOURCE_DIR}/Modules/CTestUseLaunchers.cmake)