diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2022-04-20 17:47:11 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2022-04-20 18:09:46 (GMT) |
commit | a2cb1754a59d870f2a507d071d0c6c5891702645 (patch) | |
tree | 3fe19137f6149023c7226d67db746eeb604117b5 | |
parent | 722e4d4619d32fa3da1a3de7fb7b37a87f5a6a8c (diff) | |
download | CMake-a2cb1754a59d870f2a507d071d0c6c5891702645.zip CMake-a2cb1754a59d870f2a507d071d0c6c5891702645.tar.gz CMake-a2cb1754a59d870f2a507d071d0c6c5891702645.tar.bz2 |
cmExportFileGenerator: require CMake 2.8.3
This allows use of `CMAKE_CURRENT_LIST_DIR`, `foreach(IN LISTS)`,
`if(VERSION_*)`, and more.
Note that generated filesets code already uses `if(VERSION_*)` and
requires CMake 2.8.3 in practice.
-rw-r--r-- | Source/cmExportFileGenerator.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index 6d6df71..3143c12 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -922,8 +922,11 @@ void cmExportFileGenerator::GeneratePolicyHeaderCode(std::ostream& os) // Protect that file against use with older CMake versions. /* clang-format off */ os << "# Generated by CMake\n\n"; - os << "if(\"${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}\" LESS 2.6)\n" - << " message(FATAL_ERROR \"CMake >= 2.6.0 required\")\n" + os << "if(\"${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}\" LESS 2.8)\n" + << " message(FATAL_ERROR \"CMake >= 2.8.0 required\")\n" + << "endif()\n" + << "if(CMAKE_VERSION VERSION_LESS \"2.8.3\")\n" + << " message(FATAL_ERROR \"CMake >= 2.8.3 required\")\n" << "endif()\n"; /* clang-format on */ @@ -935,7 +938,7 @@ void cmExportFileGenerator::GeneratePolicyHeaderCode(std::ostream& os) // versions. /* clang-format off */ os << "cmake_policy(PUSH)\n" - << "cmake_policy(VERSION 2.6...3.22)\n"; + << "cmake_policy(VERSION 2.8.3...3.22)\n"; /* clang-format on */ } |