mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-29 04:09:35 +03:00
export: Increase maximum policy version in exported files to 4.2
The files generated by `install(EXPORT)`, `export()`, and `install_jar_exports()` commands are known to work with policies as of CMake 4.2, so enable them in sufficiently new CMake versions.
This commit is contained in:
1 parent
0d5069d5e8
commit
5d5435c8ce
2 files changed
+3
-3
No files matched your search
@@ -1,5 +1,5 @@
|
|||||||
cmake_policy(PUSH)
|
cmake_policy(PUSH)
|
||||||
cmake_policy(VERSION 2.8.12...4.1)
|
cmake_policy(VERSION 2.8.12...4.2)
|
||||||
|
|
||||||
#----------------------------------------------------------------
|
#----------------------------------------------------------------
|
||||||
# Generated CMake Java target import file.
|
# Generated CMake Java target import file.
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ void cmExportCMakeConfigGenerator::GeneratePolicyHeaderCode(std::ostream& os)
|
|||||||
// Isolate the file policy level.
|
// Isolate the file policy level.
|
||||||
// Support CMake versions as far back as the
|
// Support CMake versions as far back as the
|
||||||
// RequiredCMakeVersion{Major,Minor,Patch}, but also support using NEW
|
// RequiredCMakeVersion{Major,Minor,Patch}, but also support using NEW
|
||||||
// policy settings for up to CMake 4.1 (this upper limit may be reviewed
|
// policy settings for up to CMake 4.2 (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.
|
||||||
@@ -182,7 +182,7 @@ void cmExportCMakeConfigGenerator::GeneratePolicyHeaderCode(std::ostream& os)
|
|||||||
"cmake_policy(VERSION "
|
"cmake_policy(VERSION "
|
||||||
<< this->RequiredCMakeVersionMajor << '.'
|
<< this->RequiredCMakeVersionMajor << '.'
|
||||||
<< this->RequiredCMakeVersionMinor << '.'
|
<< this->RequiredCMakeVersionMinor << '.'
|
||||||
<< this->RequiredCMakeVersionPatch << "...4.1)\n";
|
<< this->RequiredCMakeVersionPatch << "...4.2)\n";
|
||||||
/* clang-format on */
|
/* clang-format on */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user