Skip to content

Commit f46495e

Browse files
gruenichcopybara-github
authored andcommitted
PR #1706: Require CMake version 3.16
Imported from GitHub PR #1706 Follow Google OSS policy. Merge 2ba42b9 into af4c589 Merging this change closes #1706 COPYBARA_INTEGRATE_REVIEW=#1706 from gruenich:feature/cmake-3-16 2ba42b9 PiperOrigin-RevId: 650646746 Change-Id: Ib600608fbc727161c8b8e69cda9a09637188fef8
1 parent af4c589 commit f46495e

File tree

4 files changed

+6
-41
lines changed

4 files changed

+6
-41
lines changed

CMake/Googletest/CMakeLists.txt.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.10)
1+
cmake_minimum_required(VERSION 3.16)
22

33
project(googletest-external NONE)
44

CMake/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ section of your executable or of your library.<br>
3939
Here is a short CMakeLists.txt example of an application project using Abseil.
4040

4141
```cmake
42-
cmake_minimum_required(VERSION 3.10)
42+
cmake_minimum_required(VERSION 3.16)
4343
project(my_app_project)
4444
4545
# Pick the C++ standard to compile with.
@@ -62,7 +62,7 @@ will control Abseil library targets) is set to at least that minimum. For
6262
example:
6363

6464
```cmake
65-
cmake_minimum_required(VERSION 3.10)
65+
cmake_minimum_required(VERSION 3.16)
6666
project(my_lib_project)
6767
6868
# Leave C++ standard up to the root application, so set it only if this is the

CMake/install_test_project/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
# A simple CMakeLists.txt for testing cmake installation
1717

18-
cmake_minimum_required(VERSION 3.10)
18+
cmake_minimum_required(VERSION 3.16)
1919
project(absl_cmake_testing CXX)
2020

2121
add_executable(simple simple.cc)

CMakeLists.txt

Lines changed: 2 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -15,43 +15,8 @@
1515
#
1616

1717
# https://github.com/google/oss-policies-info/blob/main/foundational-cxx-support-matrix.md
18-
# As of 2022-09-06, CMake 3.10 is the minimum supported version.
19-
cmake_minimum_required(VERSION 3.10)
20-
21-
# Compiler id for Apple Clang is now AppleClang.
22-
if (POLICY CMP0025)
23-
cmake_policy(SET CMP0025 NEW)
24-
endif (POLICY CMP0025)
25-
26-
# if command can use IN_LIST
27-
if (POLICY CMP0057)
28-
cmake_policy(SET CMP0057 NEW)
29-
endif (POLICY CMP0057)
30-
31-
# Project version variables are the empty string if version is unspecified
32-
if (POLICY CMP0048)
33-
cmake_policy(SET CMP0048 NEW)
34-
endif (POLICY CMP0048)
35-
36-
# Honor the GTest_ROOT variable if specified
37-
if (POLICY CMP0074)
38-
cmake_policy(SET CMP0074 NEW)
39-
endif (POLICY CMP0074)
40-
41-
# option() honor variables
42-
if (POLICY CMP0077)
43-
cmake_policy(SET CMP0077 NEW)
44-
endif (POLICY CMP0077)
45-
46-
# Allow the user to specify the MSVC runtime
47-
if (POLICY CMP0091)
48-
cmake_policy(SET CMP0091 NEW)
49-
endif (POLICY CMP0091)
50-
51-
# try_compile() honors the CMAKE_CXX_STANDARD value
52-
if (POLICY CMP0067)
53-
cmake_policy(SET CMP0067 NEW)
54-
endif (POLICY CMP0067)
18+
# As of 2024-07-01, CMake 3.16 is the minimum supported version.
19+
cmake_minimum_required(VERSION 3.16)
5520

5621
# Allow the user to specify the CMAKE_MSVC_DEBUG_INFORMATION_FORMAT
5722
if (POLICY CMP0141)

0 commit comments

Comments
 (0)