Browse Source

Merge topic 'deprecate-pre-2.8.12'

5845c218d7 Deprecate compatibility with CMake versions older than 2.8.12
7b07ccdd2b Tests/*Only: Update cmake_minimum_required versions
9b99b4bfc8 Tests/RunCMake: Update cmake_minimum_required versions
fcea4a3b45 cmStateSnapshot: Invert CanPopPolicyScope return value to match name

Acked-by: Kitware Robot <[email protected]>
Acked-by: Ben Boeckel <[email protected]>
Merge-request: !4897
Craig Scott 5 years ago
parent
commit
4f90fef85f
98 changed files with 253 additions and 92 deletions
  1. 5 0
      Help/release/dev/deprecate-policy-old.rst
  2. 5 3
      Source/cmMakefile.cxx
  3. 27 3
      Source/cmPolicies.cxx
  4. 10 2
      Source/cmPolicies.h
  5. 1 1
      Source/cmStateSnapshot.cxx
  6. 1 1
      Tests/COnly/CMakeLists.txt
  7. 1 0
      Tests/CSharpOnly/CMakeLists.txt
  8. 1 0
      Tests/CxxOnly/CMakeLists.txt
  9. 1 1
      Tests/FortranOnly/CMakeLists.txt
  10. 6 0
      Tests/RunCMake/CMP0019/CMP0019-NEW-stderr.txt
  11. 8 1
      Tests/RunCMake/CMP0019/CMP0019-OLD-stderr.txt
  12. 7 0
      Tests/RunCMake/CMP0019/CMP0019-WARN-stderr.txt
  13. 6 0
      Tests/RunCMake/CMP0022/CMP0022-NOWARN-exe-stderr.txt
  14. 6 0
      Tests/RunCMake/CMP0022/CMP0022-NOWARN-shared-stderr.txt
  15. 6 0
      Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-NEW-stderr.txt
  16. 6 0
      Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-link_libraries-stderr.txt
  17. 6 0
      Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-stderr.txt
  18. 7 0
      Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old-stderr.txt
  19. 8 1
      Tests/RunCMake/CMP0022/CMP0022-WARN-stderr.txt
  20. 6 0
      Tests/RunCMake/CMP0022/CMP0022-export-exe-stderr.txt
  21. 1 1
      Tests/RunCMake/CMP0026/CMakeLists.txt
  22. 1 1
      Tests/RunCMake/CMP0027/CMakeLists.txt
  23. 1 1
      Tests/RunCMake/CMP0028/CMakeLists.txt
  24. 1 1
      Tests/RunCMake/CMP0037/CMakeLists.txt
  25. 1 1
      Tests/RunCMake/CMP0041/CMakeLists.txt
  26. 1 1
      Tests/RunCMake/CMP0042/CMakeLists.txt
  27. 1 1
      Tests/RunCMake/CMP0043/CMakeLists.txt
  28. 1 1
      Tests/RunCMake/CMP0045/CMakeLists.txt
  29. 1 1
      Tests/RunCMake/CTest/CMakeLists.txt
  30. 1 1
      Tests/RunCMake/CheckModules/CMakeLists.txt
  31. 1 1
      Tests/RunCMake/CompatibleInterface/CMakeLists.txt
  32. 1 1
      Tests/RunCMake/CompatibleInterface/DebugProperties.cmake
  33. 1 1
      Tests/RunCMake/CompatibleInterface/InterfaceString-builtin-prop.cmake
  34. 1 1
      Tests/RunCMake/CompilerChange/CMakeLists.txt
  35. 1 1
      Tests/RunCMake/CompilerNotFound/CMakeLists.txt
  36. 1 1
      Tests/RunCMake/Configure/CMakeLists.txt
  37. 1 1
      Tests/RunCMake/DisallowedCommands/CMakeLists.txt
  38. 1 1
      Tests/RunCMake/ExportWithoutLanguage/CMakeLists.txt
  39. 1 1
      Tests/RunCMake/ExternalData/CMakeLists.txt
  40. 1 1
      Tests/RunCMake/FPHSA/CMakeLists.txt
  41. 1 1
      Tests/RunCMake/FeatureSummary/CMakeLists.txt
  42. 1 1
      Tests/RunCMake/File_Generate/CMakeLists.txt
  43. 1 1
      Tests/RunCMake/FindPkgConfig/CMakeLists.txt
  44. 1 1
      Tests/RunCMake/GeneratorExpression/CMakeLists.txt
  45. 1 1
      Tests/RunCMake/GeneratorPlatform/CMakeLists.txt
  46. 1 1
      Tests/RunCMake/GeneratorToolset/CMakeLists.txt
  47. 1 1
      Tests/RunCMake/IncompatibleQt/CMakeLists.txt
  48. 1 2
      Tests/RunCMake/Languages/CMakeLists.txt
  49. 1 1
      Tests/RunCMake/ObsoleteQtMacros/CMakeLists.txt
  50. 1 1
      Tests/RunCMake/PositionIndependentCode/CMakeLists.txt
  51. 1 1
      Tests/RunCMake/SourceProperties/CMakeLists.txt
  52. 1 1
      Tests/RunCMake/TargetObjects/CMakeLists.txt
  53. 1 1
      Tests/RunCMake/TargetPolicies/CMakeLists.txt
  54. 1 1
      Tests/RunCMake/TargetProperties/CMakeLists.txt
  55. 1 1
      Tests/RunCMake/TargetPropertyGeneratorExpressions/CMakeLists.txt
  56. 1 1
      Tests/RunCMake/TargetSources/CMakeLists.txt
  57. 1 1
      Tests/RunCMake/VSSolution/CMakeLists.txt
  58. 1 1
      Tests/RunCMake/XcodeProject/CMakeLists.txt
  59. 1 1
      Tests/RunCMake/XcodeProject/XcodeInstallIOS.cmake
  60. 1 1
      Tests/RunCMake/add_dependencies/CMakeLists.txt
  61. 1 1
      Tests/RunCMake/alias_targets/CMakeLists.txt
  62. 1 1
      Tests/RunCMake/alias_targets/invalid-name.cmake
  63. 1 1
      Tests/RunCMake/build_command/CMakeLists.txt
  64. 26 0
      Tests/RunCMake/cmake_minimum_required/Before2812-stderr.txt
  65. 6 0
      Tests/RunCMake/cmake_minimum_required/Before2812.cmake
  66. 2 2
      Tests/RunCMake/cmake_minimum_required/CMakeLists.txt
  67. 9 0
      Tests/RunCMake/cmake_minimum_required/CompatBefore24-stderr.txt
  68. 1 0
      Tests/RunCMake/cmake_minimum_required/RunCMakeTest.cmake
  69. 1 1
      Tests/RunCMake/ctest_memcheck/CMakeLists.txt.in
  70. 1 1
      Tests/RunCMake/ctest_memcheck/test.cmake.in
  71. 1 1
      Tests/RunCMake/export/CMakeLists.txt
  72. 1 1
      Tests/RunCMake/find_dependency/CMakeLists.txt
  73. 1 1
      Tests/RunCMake/find_package/CMakeLists.txt
  74. 6 5
      Tests/RunCMake/find_package/MissingNormalWarnNoModuleOld-stderr.txt
  75. 1 1
      Tests/RunCMake/get_property/CMakeLists.txt
  76. 1 1
      Tests/RunCMake/if/CMakeLists.txt
  77. 1 1
      Tests/RunCMake/include/CMakeLists.txt
  78. 1 1
      Tests/RunCMake/include_external_msproject/CMakeLists.txt
  79. 1 1
      Tests/RunCMake/interface_library/CMakeLists.txt
  80. 1 1
      Tests/RunCMake/interface_library/invalid_name.cmake
  81. 1 1
      Tests/RunCMake/list/CMakeLists.txt
  82. 10 1
      Tests/RunCMake/list/GET-CMP0007-WARN-stderr.txt
  83. 1 1
      Tests/RunCMake/math/CMakeLists.txt
  84. 1 1
      Tests/RunCMake/message/CMakeLists.txt
  85. 1 1
      Tests/RunCMake/no_install_prefix/CMakeLists.txt
  86. 1 1
      Tests/RunCMake/project/CMakeLists.txt
  87. 1 1
      Tests/RunCMake/string/CMakeLists.txt
  88. 1 1
      Tests/RunCMake/target_link_libraries/CMP0023-WARN-2.cmake
  89. 1 1
      Tests/RunCMake/target_link_libraries/CMP0023-WARN.cmake
  90. 1 1
      Tests/RunCMake/target_link_libraries/CMakeLists.txt
  91. 0 1
      Tests/RunCMake/target_link_libraries/StaticPrivateDepNotExported.cmake
  92. 0 1
      Tests/RunCMake/target_link_libraries/StaticPrivateDepNotTarget.cmake
  93. 1 0
      Tests/RunCMake/try_compile/CMP0056.cmake
  94. 1 1
      Tests/RunCMake/try_compile/CMakeLists.txt
  95. 1 1
      Tests/RunCMake/try_compile/proj/CMakeLists.txt
  96. 1 1
      Tests/RunCMake/try_run/CMakeLists.txt
  97. 1 1
      Tests/RunCMake/variable_watch/CMakeLists.txt
  98. 1 1
      Tests/RunCMake/while/CMakeLists.txt

+ 5 - 0
Help/release/dev/deprecate-policy-old.rst

@@ -6,3 +6,8 @@ deprecate-policy-old
   The :manual:`cmake-policies(7)` manual explains that the OLD behaviors
   of all policies are deprecated and that projects should port to the
   NEW behaviors.
+
+* Compatibility with versions of CMake older than 2.8.12 is now deprecated
+  and will be removed from a future version.  Calls to
+  :command:`cmake_minimum_required` or :command:`cmake_policy` that set
+  the policy version to an older value now issue a deprecation diagnostic.

+ 5 - 3
Source/cmMakefile.cxx

@@ -1659,7 +1659,8 @@ void cmMakefile::Configure()
         this->SetCheckCMP0000(true);
 
         // Implicitly set the version for the user.
-        this->SetPolicyVersion("2.4", std::string());
+        cmPolicies::ApplyPolicyVersion(this, 2, 4, 0,
+                                       cmPolicies::WarnCompat::Off);
       }
     }
     bool hasProject = false;
@@ -4605,7 +4606,7 @@ void cmMakefile::PopSnapshot(bool reportError)
   // cmStateSnapshot manages nested policy scopes within it.
   // Since the scope corresponding to the snapshot is closing,
   // reject any still-open nested policy scopes with an error.
-  while (!this->StateSnapshot.CanPopPolicyScope()) {
+  while (this->StateSnapshot.CanPopPolicyScope()) {
     if (reportError) {
       this->IssueMessage(MessageType::FATAL_ERROR,
                          "cmake_policy PUSH without matching POP");
@@ -4621,7 +4622,8 @@ void cmMakefile::PopSnapshot(bool reportError)
 bool cmMakefile::SetPolicyVersion(std::string const& version_min,
                                   std::string const& version_max)
 {
-  return cmPolicies::ApplyPolicyVersion(this, version_min, version_max);
+  return cmPolicies::ApplyPolicyVersion(this, version_min, version_max,
+                                        cmPolicies::WarnCompat::On);
 }
 
 bool cmMakefile::HasCMP0054AlreadyBeenReported(

+ 27 - 3
Source/cmPolicies.cxx

@@ -7,9 +7,11 @@
 #include <sstream>
 #include <vector>
 
+#include "cmListFileCache.h"
 #include "cmMakefile.h"
 #include "cmMessageType.h"
 #include "cmState.h"
+#include "cmStateSnapshot.h"
 #include "cmStateTypes.h"
 #include "cmStringAlgorithms.h"
 #include "cmSystemTools.h"
@@ -157,7 +159,8 @@ static bool GetPolicyDefault(cmMakefile* mf, std::string const& policy,
 
 bool cmPolicies::ApplyPolicyVersion(cmMakefile* mf,
                                     std::string const& version_min,
-                                    std::string const& version_max)
+                                    std::string const& version_max,
+                                    WarnCompat warnCompat)
 {
   // Parse components of the minimum version.
   unsigned int minMajor = 2;
@@ -244,13 +247,34 @@ bool cmPolicies::ApplyPolicyVersion(cmMakefile* mf,
     polPatch = maxPatch;
   }
 
-  return cmPolicies::ApplyPolicyVersion(mf, polMajor, polMinor, polPatch);
+  return cmPolicies::ApplyPolicyVersion(mf, polMajor, polMinor, polPatch,
+                                        warnCompat);
 }
 
 bool cmPolicies::ApplyPolicyVersion(cmMakefile* mf, unsigned int majorVer,
                                     unsigned int minorVer,
-                                    unsigned int patchVer)
+                                    unsigned int patchVer,
+                                    WarnCompat warnCompat)
 {
+  // Warn about policy versions for which support will be removed.
+  if (warnCompat == WarnCompat::On &&
+      (majorVer < 2 || (majorVer == 2 && minorVer < 8) ||
+       (majorVer == 2 && minorVer == 8 && patchVer < 12)) &&
+      // Avoid warning on calls generated by install(EXPORT)
+      // in CMake versions prior to 3.18.
+      !(majorVer == 2 && minorVer == 6 && patchVer == 0 &&
+        mf->GetStateSnapshot().CanPopPolicyScope() &&
+        cmSystemTools::Strucmp(mf->GetBacktrace().Top().Name.c_str(),
+                               "cmake_policy") == 0)) {
+    mf->IssueMessage(
+      MessageType::DEPRECATION_WARNING,
+      "Compatibility with CMake < 2.8.12 will be removed from "
+      "a future version of CMake.\n"
+      "Update the VERSION argument <min> value or use a ...<max> suffix "
+      "to tell CMake that the project does not need compatibility with "
+      "older versions.");
+  }
+
   // now loop over all the policies and set them as appropriate
   std::vector<cmPolicies::PolicyID> ancientPolicies;
   for (PolicyID pid = cmPolicies::CMP0000; pid != cmPolicies::CMPCOUNT;

+ 10 - 2
Source/cmPolicies.h

@@ -399,12 +399,20 @@ public:
   //! Get the default status for a policy
   static cmPolicies::PolicyStatus GetPolicyStatus(cmPolicies::PolicyID id);
 
+  enum class WarnCompat
+  {
+    Off,
+    On
+  };
+
   //! Set a policy level for this listfile
   static bool ApplyPolicyVersion(cmMakefile* mf,
                                  std::string const& version_min,
-                                 std::string const& version_max);
+                                 std::string const& version_max,
+                                 WarnCompat warnCompat);
   static bool ApplyPolicyVersion(cmMakefile* mf, unsigned int majorVer,
-                                 unsigned int minorVer, unsigned int patchVer);
+                                 unsigned int minorVer, unsigned int patchVer,
+                                 WarnCompat warnCompat);
 
   //! return a warning string for a given policy
   static std::string GetPolicyWarning(cmPolicies::PolicyID id);

+ 1 - 1
Source/cmStateSnapshot.cxx

@@ -148,7 +148,7 @@ bool cmStateSnapshot::PopPolicy()
 
 bool cmStateSnapshot::CanPopPolicyScope()
 {
-  return this->Position->Policies == this->Position->PolicyScope;
+  return this->Position->Policies != this->Position->PolicyScope;
 }
 
 void cmStateSnapshot::SetPolicy(cmPolicies::PolicyID id,

+ 1 - 1
Tests/COnly/CMakeLists.txt

@@ -1,5 +1,5 @@
 # a simple C only test case
-cmake_minimum_required (VERSION 2.6)
+cmake_minimum_required(VERSION 2.8.12)
 project (COnly C)
 
 set(CMAKE_DEBUG_POSTFIX "_test_debug_postfix")

+ 1 - 0
Tests/CSharpOnly/CMakeLists.txt

@@ -1,3 +1,4 @@
+cmake_minimum_required(VERSION 3.3)
 # a simple CSharp only test case
 project (CSharpOnly CSharp)
 

+ 1 - 0
Tests/CxxOnly/CMakeLists.txt

@@ -1,4 +1,5 @@
 # a simple CXX only test case
+cmake_minimum_required(VERSION 2.8.12)
 project (CxxOnly CXX)
 
 set(CMAKE_DEBUG_POSTFIX "_test_debug_postfix")

+ 1 - 1
Tests/FortranOnly/CMakeLists.txt

@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8)
+cmake_minimum_required(VERSION 2.8.12)
 project(FortranOnly Fortran)
 message("CTEST_FULL_OUTPUT ")
 

+ 6 - 0
Tests/RunCMake/CMP0019/CMP0019-NEW-stderr.txt

@@ -0,0 +1,6 @@
+^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\):
+  Compatibility with CMake < 2.8.12 will be removed from a future version of
+  CMake.
+
+  Update the VERSION argument <min> value or use a ...<max> suffix to tell
+  CMake that the project does not need compatibility with older versions.$

+ 8 - 1
Tests/RunCMake/CMP0019/CMP0019-OLD-stderr.txt

@@ -1,4 +1,11 @@
-^CMake Deprecation Warning at CMP0019-OLD.cmake:[0-9]+ \(cmake_policy\):
+^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\):
+  Compatibility with CMake < 2.8.12 will be removed from a future version of
+  CMake.
+
+  Update the VERSION argument <min> value or use a ...<max> suffix to tell
+  CMake that the project does not need compatibility with older versions.
++
+CMake Deprecation Warning at CMP0019-OLD.cmake:[0-9]+ \(cmake_policy\):
   The OLD behavior for policy CMP0019 will be removed from a future version
   of CMake.
 

+ 7 - 0
Tests/RunCMake/CMP0019/CMP0019-WARN-stderr.txt

@@ -1,3 +1,10 @@
+^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\):
+  Compatibility with CMake < 2.8.12 will be removed from a future version of
+  CMake.
+
+  Update the VERSION argument <min> value or use a ...<max> suffix to tell
+  CMake that the project does not need compatibility with older versions.
++
 CMake Warning \(dev\) in CMakeLists.txt:
   Policy CMP0019 is not set: Do not re-expand variables in include and link
   information.  Run "cmake --help-policy CMP0019" for policy details.  Use

+ 6 - 0
Tests/RunCMake/CMP0022/CMP0022-NOWARN-exe-stderr.txt

@@ -0,0 +1,6 @@
+^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\):
+  Compatibility with CMake < 2.8.12 will be removed from a future version of
+  CMake.
+
+  Update the VERSION argument <min> value or use a ...<max> suffix to tell
+  CMake that the project does not need compatibility with older versions.$

+ 6 - 0
Tests/RunCMake/CMP0022/CMP0022-NOWARN-shared-stderr.txt

@@ -0,0 +1,6 @@
+^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\):
+  Compatibility with CMake < 2.8.12 will be removed from a future version of
+  CMake.
+
+  Update the VERSION argument <min> value or use a ...<max> suffix to tell
+  CMake that the project does not need compatibility with older versions.$

+ 6 - 0
Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-NEW-stderr.txt

@@ -0,0 +1,6 @@
+^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\):
+  Compatibility with CMake < 2.8.12 will be removed from a future version of
+  CMake.
+
+  Update the VERSION argument <min> value or use a ...<max> suffix to tell
+  CMake that the project does not need compatibility with older versions.$

+ 6 - 0
Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-link_libraries-stderr.txt

@@ -0,0 +1,6 @@
+^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\):
+  Compatibility with CMake < 2.8.12 will be removed from a future version of
+  CMake.
+
+  Update the VERSION argument <min> value or use a ...<max> suffix to tell
+  CMake that the project does not need compatibility with older versions.$

+ 6 - 0
Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-stderr.txt

@@ -0,0 +1,6 @@
+^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\):
+  Compatibility with CMake < 2.8.12 will be removed from a future version of
+  CMake.
+
+  Update the VERSION argument <min> value or use a ...<max> suffix to tell
+  CMake that the project does not need compatibility with older versions.$

+ 7 - 0
Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old-stderr.txt

@@ -1,3 +1,10 @@
+^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\):
+  Compatibility with CMake < 2.8.12 will be removed from a future version of
+  CMake.
+
+  Update the VERSION argument <min> value or use a ...<max> suffix to tell
+  CMake that the project does not need compatibility with older versions.
++
 CMake Warning \(dev\) in CMakeLists.txt:
   Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES defines the link
   interface.  Run "cmake --help-policy CMP0022" for policy details.  Use the

+ 8 - 1
Tests/RunCMake/CMP0022/CMP0022-WARN-stderr.txt

@@ -1,4 +1,11 @@
-^CMake Warning \(dev\) in CMakeLists.txt:
+^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\):
+  Compatibility with CMake < 2.8.12 will be removed from a future version of
+  CMake.
+
+  Update the VERSION argument <min> value or use a ...<max> suffix to tell
+  CMake that the project does not need compatibility with older versions.
++
+CMake Warning \(dev\) in CMakeLists.txt:
   Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES defines the link
   interface.  Run "cmake --help-policy CMP0022" for policy details.  Use the
   cmake_policy command to set the policy and suppress this warning.

+ 6 - 0
Tests/RunCMake/CMP0022/CMP0022-export-exe-stderr.txt

@@ -0,0 +1,6 @@
+^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\):
+  Compatibility with CMake < 2.8.12 will be removed from a future version of
+  CMake.
+
+  Update the VERSION argument <min> value or use a ...<max> suffix to tell
+  CMake that the project does not need compatibility with older versions.$

+ 1 - 1
Tests/RunCMake/CMP0026/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 2.8.12)
 project(${RunCMake_TEST} NONE)
 include(${RunCMake_TEST}.cmake)

+ 1 - 1
Tests/RunCMake/CMP0027/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 2.8.12)
 project(${RunCMake_TEST} NONE)
 include(${RunCMake_TEST}.cmake)

+ 1 - 1
Tests/RunCMake/CMP0028/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 2.8.12)
 project(${RunCMake_TEST} CXX)
 include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE) # policy used at end of dir

+ 1 - 1
Tests/RunCMake/CMP0037/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 2.8.12)
 project(${RunCMake_TEST} NONE)
 include(${RunCMake_TEST}.cmake)

+ 1 - 1
Tests/RunCMake/CMP0041/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 2.8.12)
 project(${RunCMake_TEST} CXX)
 include(${RunCMake_TEST}.cmake)

+ 1 - 1
Tests/RunCMake/CMP0042/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 2.8.12)
 project(${RunCMake_TEST} CXX)
 include(${RunCMake_TEST}.cmake)

+ 1 - 1
Tests/RunCMake/CMP0043/CMakeLists.txt

@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 2.8.12)
 project(${RunCMake_TEST} CXX)
 include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE) # policy used at end of dir
 

+ 1 - 1
Tests/RunCMake/CMP0045/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 2.8.12)
 project(${RunCMake_TEST} CXX)
 include(${RunCMake_TEST}.cmake)

+ 1 - 1
Tests/RunCMake/CTest/CMakeLists.txt

@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
 if(NOT NoProject)
   project(${RunCMake_TEST} NONE)
 endif()

+ 1 - 1
Tests/RunCMake/CheckModules/CMakeLists.txt

@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.11)
+cmake_minimum_required(VERSION 2.8.12)
 cmake_policy(SET CMP0054 NEW)
 project(${RunCMake_TEST} NONE)
 include(${RunCMake_TEST}.cmake)

+ 1 - 1
Tests/RunCMake/CompatibleInterface/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
 project(${RunCMake_TEST} CXX)
 include(${RunCMake_TEST}.cmake)

+ 1 - 1
Tests/RunCMake/CompatibleInterface/DebugProperties.cmake

@@ -1,5 +1,5 @@
 
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 3.3)
 
 project(CompatibleInterface)
 

+ 1 - 1
Tests/RunCMake/CompatibleInterface/InterfaceString-builtin-prop.cmake

@@ -5,5 +5,5 @@ add_library(bar UNKNOWN IMPORTED)
 set_property(TARGET foo APPEND PROPERTY COMPATIBLE_INTERFACE_STRING INCLUDE_DIRECTORIES)
 
 add_executable(user main.cpp)
-set_property(TARGET user PROPERTY INCLUDE_DIRECTORIES bar_inc)
+set_property(TARGET user PROPERTY INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}/bar_inc)
 target_link_libraries(user foo bar)

+ 1 - 1
Tests/RunCMake/CompilerChange/CMakeLists.txt

@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
 if(NOT RunCMake_TEST)
   set(RunCMake_TEST "$ENV{RunCMake_TEST}") # needed when cache is deleted
 endif()

+ 1 - 1
Tests/RunCMake/CompilerNotFound/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
 project(${RunCMake_TEST} NONE)
 include(${RunCMake_TEST}.cmake)

+ 1 - 1
Tests/RunCMake/Configure/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
 project(${RunCMake_TEST} NONE)
 include(${RunCMake_TEST}.cmake)

+ 1 - 1
Tests/RunCMake/DisallowedCommands/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 2.8.12)
 project(${RunCMake_TEST} NONE)
 include(${RunCMake_TEST}.cmake)

+ 1 - 1
Tests/RunCMake/ExportWithoutLanguage/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
 project(${RunCMake_TEST} NONE)
 include(${RunCMake_TEST}.cmake)

+ 1 - 1
Tests/RunCMake/ExternalData/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
 project(${RunCMake_TEST} NONE)
 include(${RunCMake_TEST}.cmake)

+ 1 - 1
Tests/RunCMake/FPHSA/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
 project(${RunCMake_TEST} NONE)
 include(${RunCMake_TEST}.cmake)

+ 1 - 1
Tests/RunCMake/FeatureSummary/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.11)
+cmake_minimum_required(VERSION 3.3)
 project(${RunCMake_TEST} NONE)
 include(${RunCMake_TEST}.cmake)

+ 1 - 1
Tests/RunCMake/File_Generate/CMakeLists.txt

@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
 project(${RunCMake_TEST} NONE)
 if(NOT TEST_FILE)
   set(TEST_FILE ${RunCMake_TEST}.cmake)

+ 1 - 1
Tests/RunCMake/FindPkgConfig/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.11)
+cmake_minimum_required(VERSION 3.3)
 project(${RunCMake_TEST} NONE)
 include(${RunCMake_TEST}.cmake)

+ 1 - 1
Tests/RunCMake/GeneratorExpression/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 2.8.12)
 project(${RunCMake_TEST} NONE)
 include(${RunCMake_TEST}.cmake)

+ 1 - 1
Tests/RunCMake/GeneratorPlatform/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
 project(${RunCMake_TEST} NONE)
 include(${RunCMake_TEST}.cmake)

+ 1 - 1
Tests/RunCMake/GeneratorToolset/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
 project(${RunCMake_TEST} NONE)
 include(${RunCMake_TEST}.cmake)

+ 1 - 1
Tests/RunCMake/IncompatibleQt/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
 project(${RunCMake_TEST} CXX)
 include(${RunCMake_TEST}.cmake)

+ 1 - 2
Tests/RunCMake/Languages/CMakeLists.txt

@@ -1,4 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
-cmake_policy(SET CMP0042 NEW)
+cmake_minimum_required(VERSION 3.3)
 project(${RunCMake_TEST} NONE)
 include(${RunCMake_TEST}.cmake)

+ 1 - 1
Tests/RunCMake/ObsoleteQtMacros/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.11)
+cmake_minimum_required(VERSION 3.3)
 project(${RunCMake_TEST})
 include(${RunCMake_TEST}.cmake)

+ 1 - 1
Tests/RunCMake/PositionIndependentCode/CMakeLists.txt

@@ -1,5 +1,5 @@
 
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
 project(${RunCMake_TEST} CXX)
 
 # MSVC creates extra targets which pollute the stderr unless we set this.

+ 1 - 1
Tests/RunCMake/SourceProperties/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
 project(${RunCMake_TEST} C)
 include(${RunCMake_TEST}.cmake)

+ 1 - 1
Tests/RunCMake/TargetObjects/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
 project(${RunCMake_TEST})
 include(${RunCMake_TEST}.cmake)

+ 1 - 1
Tests/RunCMake/TargetPolicies/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
 project(${RunCMake_TEST} NONE)
 include(${RunCMake_TEST}.cmake)

+ 1 - 1
Tests/RunCMake/TargetProperties/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
 project(${RunCMake_TEST})
 include(${RunCMake_TEST}.cmake)

+ 1 - 1
Tests/RunCMake/TargetPropertyGeneratorExpressions/CMakeLists.txt

@@ -1,5 +1,5 @@
 
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
 project(${RunCMake_TEST} CXX)
 
 # MSVC creates extra targets which pollute the stderr unless we set this.

+ 1 - 1
Tests/RunCMake/TargetSources/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 2.8.12)
 project(${RunCMake_TEST} CXX)
 include(${RunCMake_TEST}.cmake)

+ 1 - 1
Tests/RunCMake/VSSolution/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
 project(${RunCMake_TEST} NONE)
 include(${RunCMake_TEST}.cmake)

+ 1 - 1
Tests/RunCMake/XcodeProject/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
 project(${RunCMake_TEST} NONE)
 include(${RunCMake_TEST}.cmake)

+ 1 - 1
Tests/RunCMake/XcodeProject/XcodeInstallIOS.cmake

@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.5)
+cmake_minimum_required(VERSION 3.3)
 
 project(XcodeInstallIOS)
 

+ 1 - 1
Tests/RunCMake/add_dependencies/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
 project(${RunCMake_TEST} NONE)
 include(${RunCMake_TEST}.cmake)

+ 1 - 1
Tests/RunCMake/alias_targets/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
 project(${RunCMake_TEST} NONE)
 include(${RunCMake_TEST}.cmake)

+ 1 - 1
Tests/RunCMake/alias_targets/invalid-name.cmake

@@ -1,4 +1,4 @@
-
+cmake_minimum_required(VERSION 2.8.12)
 enable_language(CXX)
 
 add_library(foo empty.cpp)

+ 1 - 1
Tests/RunCMake/build_command/CMakeLists.txt

@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
 if(NOT NoProject)
   project(${RunCMake_TEST} NONE)
 endif()

+ 26 - 0
Tests/RunCMake/cmake_minimum_required/Before2812-stderr.txt

@@ -0,0 +1,26 @@
+^CMake Deprecation Warning at Before2812.cmake:1 \(cmake_minimum_required\):
+  Compatibility with CMake < 2.8.12 will be removed from a future version of
+  CMake.
+
+  Update the VERSION argument <min> value or use a ...<max> suffix to tell
+  CMake that the project does not need compatibility with older versions.
+Call Stack \(most recent call first\):
+  CMakeLists.txt:3 \(include\)
++
+CMake Deprecation Warning at Before2812.cmake:2 \(cmake_policy\):
+  Compatibility with CMake < 2.8.12 will be removed from a future version of
+  CMake.
+
+  Update the VERSION argument <min> value or use a ...<max> suffix to tell
+  CMake that the project does not need compatibility with older versions.
+Call Stack \(most recent call first\):
+  CMakeLists.txt:3 \(include\)
++
+CMake Deprecation Warning at Before2812.cmake:6 \(cmake_policy\):
+  Compatibility with CMake < 2.8.12 will be removed from a future version of
+  CMake.
+
+  Update the VERSION argument <min> value or use a ...<max> suffix to tell
+  CMake that the project does not need compatibility with older versions.
+Call Stack \(most recent call first\):
+  CMakeLists.txt:3 \(include\)$

+ 6 - 0
Tests/RunCMake/cmake_minimum_required/Before2812.cmake

@@ -0,0 +1,6 @@
+cmake_minimum_required(VERSION 2.8.11)
+cmake_policy(VERSION 2.6)
+cmake_policy(PUSH)
+cmake_policy(VERSION 2.6) # simulate pre-3.18 install(EXPORT)-generated call
+cmake_policy(POP)
+cmake_policy(VERSION 2.8.11)

+ 2 - 2
Tests/RunCMake/cmake_minimum_required/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8.12)
 project(${RunCMake_TEST} NONE)
-include(${RunCMake_TEST}.cmake)
+include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE)

+ 9 - 0
Tests/RunCMake/cmake_minimum_required/CompatBefore24-stderr.txt

@@ -1,3 +1,12 @@
+^CMake Deprecation Warning at CompatBefore24.cmake:1 \(cmake_minimum_required\):
+  Compatibility with CMake < 2.8.12 will be removed from a future version of
+  CMake.
+
+  Update the VERSION argument <min> value or use a ...<max> suffix to tell
+  CMake that the project does not need compatibility with older versions.
+Call Stack \(most recent call first\):
+  CMakeLists.txt:3 \(include\)
++
 CMake Error in CMakeLists.txt:
   You have set CMAKE_BACKWARDS_COMPATIBILITY to a CMake version less than
   2.4.  This version of CMake only supports backwards compatibility with

+ 1 - 0
Tests/RunCMake/cmake_minimum_required/RunCMakeTest.cmake

@@ -4,6 +4,7 @@ run_cmake(Before24)
 run_cmake(CompatBefore24)
 run_cmake(Future)
 run_cmake(PolicyBefore24)
+run_cmake(Before2812)
 run_cmake(Range)
 run_cmake(RangeBad)
 run_cmake(Unknown)

+ 1 - 1
Tests/RunCMake/ctest_memcheck/CMakeLists.txt.in

@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.9)
+cmake_minimum_required(VERSION 3.3)
 project(CTestTestMemcheck@CASE_NAME@ NONE)
 include(CTest)
 

+ 1 - 1
Tests/RunCMake/ctest_memcheck/test.cmake.in

@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.9)
+cmake_minimum_required(VERSION 3.3)
 
 # Settings:
 set(CTEST_SITE                          "@SITE@")

+ 1 - 1
Tests/RunCMake/export/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
 project(${RunCMake_TEST} NONE)
 include(${RunCMake_TEST}.cmake)

+ 1 - 1
Tests/RunCMake/find_dependency/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
 project(${RunCMake_TEST} NONE)
 include(${RunCMake_TEST}.cmake)

+ 1 - 1
Tests/RunCMake/find_package/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
 project(${RunCMake_TEST} NONE)
 include(${RunCMake_TEST}.cmake)

+ 6 - 5
Tests/RunCMake/find_package/MissingNormalWarnNoModuleOld-stderr.txt

@@ -1,9 +1,10 @@
 CMake Warning \(dev\) at MissingNormalWarnNoModuleOld.cmake:2 \(find_package\):
-  find_package called without NO_MODULE option and no FindNotHere.cmake
-  module is in CMAKE_MODULE_PATH.  Add NO_MODULE to exclusively request
-  Config mode and search for a package configuration file provided by NotHere
-  \(NotHereConfig.cmake or nothere-config.cmake\).  Otherwise make
-  FindNotHere.cmake available in CMAKE_MODULE_PATH.
+  find_package called without either MODULE or CONFIG option and no
+  FindNotHere.cmake module is in CMAKE_MODULE_PATH.  Add MODULE to
+  exclusively request Module mode and fail if FindNotHere.cmake is missing.
+  Add CONFIG to exclusively request Config mode and search for a package
+  configuration file provided by NotHere \(NotHereConfig.cmake or
+  nothere-config.cmake\).
 
   \(Variable CMAKE_FIND_PACKAGE_WARN_NO_MODULE enabled this warning.\)
 Call Stack \(most recent call first\):

+ 1 - 1
Tests/RunCMake/get_property/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
 project(${RunCMake_TEST} NONE)
 include(${RunCMake_TEST}.cmake)

+ 1 - 1
Tests/RunCMake/if/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
 project(${RunCMake_TEST} NONE)
 include(${RunCMake_TEST}.cmake)

+ 1 - 1
Tests/RunCMake/include/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 2.8.12)
 project(${RunCMake_TEST} NONE)
 include(${RunCMake_TEST}.cmake)

+ 1 - 1
Tests/RunCMake/include_external_msproject/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
 project(${RunCMake_TEST} NONE)
 include(${RunCMake_TEST}.cmake)

+ 1 - 1
Tests/RunCMake/interface_library/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
 project(${RunCMake_TEST} NONE)
 include(${RunCMake_TEST}.cmake)

+ 1 - 1
Tests/RunCMake/interface_library/invalid_name.cmake

@@ -1,4 +1,4 @@
-
+cmake_minimum_required(VERSION 2.8.12)
 add_library(if$ace INTERFACE)
 
 add_library(iface::target INTERFACE)

+ 1 - 1
Tests/RunCMake/list/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 2.8.12)
 project(${RunCMake_TEST} NONE)
 include(${RunCMake_TEST}.cmake)

+ 10 - 1
Tests/RunCMake/list/GET-CMP0007-WARN-stderr.txt

@@ -1,4 +1,13 @@
-^CMake Warning \(dev\) at GET-CMP0007-WARN.cmake:4 \(list\):
+^CMake Deprecation Warning at GET-CMP0007-WARN.cmake:1 \(cmake_policy\):
+  Compatibility with CMake < 2.8.12 will be removed from a future version of
+  CMake.
+
+  Update the VERSION argument <min> value or use a ...<max> suffix to tell
+  CMake that the project does not need compatibility with older versions.
+Call Stack \(most recent call first\):
+  CMakeLists.txt:3 \(include\)
++
+CMake Warning \(dev\) at GET-CMP0007-WARN.cmake:4 \(list\):
   Policy CMP0007 is not set: list command no longer ignores empty elements.
   Run "cmake --help-policy CMP0007" for policy details.  Use the cmake_policy
   command to set the policy and suppress this warning.  List has value =

+ 1 - 1
Tests/RunCMake/math/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
 project(${RunCMake_TEST} NONE)
 include(${RunCMake_TEST}.cmake)

+ 1 - 1
Tests/RunCMake/message/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
 project(${RunCMake_TEST} NONE)
 include(${RunCMake_TEST}.cmake)

+ 1 - 1
Tests/RunCMake/no_install_prefix/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
 project(${RunCMake_TEST} NONE)
 include(${RunCMake_TEST}.cmake)

+ 1 - 1
Tests/RunCMake/project/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 2.8.12)
 project(${RunCMake_TEST} NONE)
 include(${RunCMake_TEST}.cmake)

+ 1 - 1
Tests/RunCMake/string/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
 project(${RunCMake_TEST} NONE)
 include(${RunCMake_TEST}.cmake)

+ 1 - 1
Tests/RunCMake/target_link_libraries/CMP0023-WARN-2.cmake

@@ -1,4 +1,4 @@
-
+cmake_minimum_required(VERSION 2.8.11)
 project(CMP0022-WARN)
 
 add_library(foo SHARED empty_vs6_1.cpp)

+ 1 - 1
Tests/RunCMake/target_link_libraries/CMP0023-WARN.cmake

@@ -1,4 +1,4 @@
-
+cmake_minimum_required(VERSION 2.8.11)
 project(CMP0022-WARN)
 
 add_library(foo SHARED empty_vs6_1.cpp)

+ 1 - 1
Tests/RunCMake/target_link_libraries/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 2.8.12)
 project(${RunCMake_TEST} NONE)
 include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE)

+ 0 - 1
Tests/RunCMake/target_link_libraries/StaticPrivateDepNotExported.cmake

@@ -1,4 +1,3 @@
-cmake_policy(SET CMP0022 NEW)
 enable_language(C)
 add_library(foo STATIC empty.c)
 add_library(not_exported STATIC empty.c)

+ 0 - 1
Tests/RunCMake/target_link_libraries/StaticPrivateDepNotTarget.cmake

@@ -1,4 +1,3 @@
-cmake_policy(SET CMP0022 NEW)
 enable_language(C)
 add_library(foo STATIC empty.c)
 target_link_libraries(foo PRIVATE not_a_target)

+ 1 - 0
Tests/RunCMake/try_compile/CMP0056.cmake

@@ -1,3 +1,4 @@
+cmake_minimum_required(VERSION 3.1)
 enable_language(C)
 set(obj "${CMAKE_C_OUTPUT_EXTENSION}")
 if(BORLAND)

+ 1 - 1
Tests/RunCMake/try_compile/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
 project(${RunCMake_TEST} NONE)
 include(${RunCMake_TEST}.cmake)

+ 1 - 1
Tests/RunCMake/try_compile/proj/CMakeLists.txt

@@ -1,2 +1,2 @@
-cmake_minimum_required(VERSION 2.8.10)
+cmake_minimum_required(VERSION 3.3)
 project(TestProject NONE)

+ 1 - 1
Tests/RunCMake/try_run/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.0)
+cmake_minimum_required(VERSION 3.3)
 project(${RunCMake_TEST} C)
 include(${RunCMake_TEST}.cmake)

+ 1 - 1
Tests/RunCMake/variable_watch/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
 project(${RunCMake_TEST} NONE)
 include(${RunCMake_TEST}.cmake)

+ 1 - 1
Tests/RunCMake/while/CMakeLists.txt

@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
 project(${RunCMake_TEST} NONE)
 include(${RunCMake_TEST}.cmake)