Explorar o código

export: Increase maximum policy version in exported files to 3.28

The files generated by `install(EXPORT)`, `export()`, and
`install_jar_exports()` commands are known to work with policies
as of CMake 3.28, so enable them in sufficiently new CMake versions.
Brad King hai 1 ano
pai
achega
c432365e10
Modificáronse 2 ficheiros con 5 adicións e 4 borrados
  1. 1 1
      Modules/UseJava/javaTargets.cmake.in
  2. 4 3
      Source/cmExportFileGenerator.cxx

+ 1 - 1
Modules/UseJava/javaTargets.cmake.in

@@ -1,5 +1,5 @@
 cmake_policy(PUSH)
-cmake_policy(VERSION 2.8.12...3.27)
+cmake_policy(VERSION 2.8.12...3.28)
 
 #----------------------------------------------------------------
 # Generated CMake Java target import file.

+ 4 - 3
Source/cmExportFileGenerator.cxx

@@ -985,8 +985,9 @@ void cmExportFileGenerator::GeneratePolicyHeaderCode(std::ostream& os)
   /* clang-format on */
 
   // 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.27 (this upper limit may be reviewed
+  // Support CMake versions as far back as the
+  // RequiredCMakeVersion{Major,Minor,Patch}, but also support using NEW
+  // policy settings for up to CMake 3.28 (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.
@@ -995,7 +996,7 @@ void cmExportFileGenerator::GeneratePolicyHeaderCode(std::ostream& os)
      << "cmake_policy(VERSION "
      << this->RequiredCMakeVersionMajor << '.'
      << this->RequiredCMakeVersionMinor << '.'
-     << this->RequiredCMakeVersionPatch << "...3.27)\n";
+     << this->RequiredCMakeVersionPatch << "...3.28)\n";
   /* clang-format on */
 }