From ea9c8ff5789bd3ff3ae842903f198700e4e1a11f Mon Sep 17 00:00:00 2001 From: Derek Mauro Date: Wed, 7 Sep 2022 06:58:32 -0700 Subject: [PATCH] CMake: Require at least CMake 3.10 This is the current minimum according to https://github.com/google/oss-policies-info/blob/main/foundational-cxx-support-matrix.md PiperOrigin-RevId: 472714045 Change-Id: I5930bbbc4eec4644d22bba703957d1764c2e76be --- CMake/Googletest/CMakeLists.txt.in | 2 +- CMake/README.md | 4 ++-- CMake/install_test_project/CMakeLists.txt | 2 +- CMakeLists.txt | 9 +++------ 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/CMake/Googletest/CMakeLists.txt.in b/CMake/Googletest/CMakeLists.txt.in index 5769e3a9..75691b11 100644 --- a/CMake/Googletest/CMakeLists.txt.in +++ b/CMake/Googletest/CMakeLists.txt.in @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.2) +cmake_minimum_required(VERSION 3.10) project(googletest-external NONE) diff --git a/CMake/README.md b/CMake/README.md index 0be3b926..19fb327c 100644 --- a/CMake/README.md +++ b/CMake/README.md @@ -39,7 +39,7 @@ section of your executable or of your library.
Here is a short CMakeLists.txt example of an application project using Abseil. ```cmake -cmake_minimum_required(VERSION 3.8.2) +cmake_minimum_required(VERSION 3.10) project(my_app_project) # Pick the C++ standard to compile with. @@ -62,7 +62,7 @@ will control Abseil library targets) is set to at least that minimum. For example: ```cmake -cmake_minimum_required(VERSION 3.8.2) +cmake_minimum_required(VERSION 3.10) project(my_lib_project) # Leave C++ standard up to the root application, so set it only if this is the diff --git a/CMake/install_test_project/CMakeLists.txt b/CMake/install_test_project/CMakeLists.txt index b865b2ec..30c23b2c 100644 --- a/CMake/install_test_project/CMakeLists.txt +++ b/CMake/install_test_project/CMakeLists.txt @@ -15,7 +15,7 @@ # A simple CMakeLists.txt for testing cmake installation -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.10) project(absl_cmake_testing CXX) add_executable(simple simple.cc) diff --git a/CMakeLists.txt b/CMakeLists.txt index 016dd917..3b67d8fe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,12 +14,9 @@ # limitations under the License. # -# Most widely used distributions have cmake 3.5 or greater available as of March -# 2019. A notable exception is RHEL-7 (CentOS7). You can install a current -# version of CMake by first installing Extra Packages for Enterprise Linux -# (https://fedoraproject.org/wiki/EPEL#Extra_Packages_for_Enterprise_Linux_.28EPEL.29) -# and then issuing `yum install cmake3` on the command line. -cmake_minimum_required(VERSION 3.5) +# https://github.com/google/oss-policies-info/blob/main/foundational-cxx-support-matrix.md +# As of 2022-09-06, CMake 3.10 is the minimum supported version. +cmake_minimum_required(VERSION 3.10) # Compiler id for Apple Clang is now AppleClang. if (POLICY CMP0025)