1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-22 16:07:49 +08:00

export: Increase maximum policy version in exported files to 3.22

The files generatd by `install(EXPORT)` and `export()` commands
are known to work with policies as of CMake 3.22, so enable them
in sufficiently new CMake versions.
This commit is contained in:
Brad King
2022-02-03 10:38:21 -05:00
parent a9ffded98c
commit a5a9687799

View File

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