mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-01 04:03:24 +03:00
export: Increase maximum policy version in exported files to 3.23
The files generatd by `install(EXPORT)` and `export()` commands are known to work with policies as of CMake 3.23, so enable them in sufficiently new CMake versions.
This commit is contained in:
1 parent
5c8b776ca3
commit
25b1312a6d
1 file changed
+2
-2
@@ -932,13 +932,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.22 (this upper limit may be reviewed
|
||||
// policy settings for up to CMake 3.23 (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.22)\n";
|
||||
<< "cmake_policy(VERSION 2.8.3...3.23)\n";
|
||||
/* clang-format on */
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user