Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Note: CMake support is community-based. The maintainers do not use CMake
# internally.

cmake_minimum_required(VERSION 2.8.8)
cmake_minimum_required(VERSION 2.8.12)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# Adding ... to version rage to future proof code when using cmake > 3.18 that explicitly 
# deprecated 2.8.12 features
cmake_minimum_required(VERSION 2.8.12...)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Version range was added in 3.12 to this command and the goal is to support 2.8.12 as a minimum.

Also, empty max range?

Copy link

@remyjette remyjette Dec 21, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the linked docs:

The optional <max> version, if specified, must be at least the <min> version and affects policy settings as described below. If the running version of CMake is older than 3.12, the extra ... dots will be seen as version component separators, resulting in the ...<max> part being ignored and preserving the pre-3.12 behavior of basing policies on <min>.

With that being said I don't think the ... makes much sense to add if no <max> is being specified.


if (POLICY CMP0048)
cmake_policy(SET CMP0048 NEW)
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ and their own tests from a git checkout, which has further requirements:

* [Python](https://www.python.org/) v2.3 or newer (for running some of the
tests and re-generating certain source files from templates)
* [CMake](https://cmake.org/) v2.6.4 or newer
* [CMake](https://cmake.org/) v2.8.12 or newer

## Developing Google Test and Google Mock

Expand Down
2 changes: 1 addition & 1 deletion googlemock/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ else()
cmake_policy(SET CMP0048 NEW)
project(gmock VERSION ${GOOGLETEST_VERSION} LANGUAGES CXX C)
endif()
cmake_minimum_required(VERSION 2.6.4)
cmake_minimum_required(VERSION 2.8.12)

if (COMMAND set_up_hermetic_build)
set_up_hermetic_build()
Expand Down
2 changes: 1 addition & 1 deletion googletest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ else()
cmake_policy(SET CMP0048 NEW)
project(gtest VERSION ${GOOGLETEST_VERSION} LANGUAGES CXX C)
endif()
cmake_minimum_required(VERSION 2.6.4)
cmake_minimum_required(VERSION 2.8.12)

if (POLICY CMP0063) # Visibility
cmake_policy(SET CMP0063 NEW)
Expand Down
2 changes: 1 addition & 1 deletion googletest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ pulled into the main build with `add_subdirectory()`. For example:
New file `CMakeLists.txt.in`:

```cmake
cmake_minimum_required(VERSION 2.8.2)
cmake_minimum_required(VERSION 2.8.12)

project(googletest-download NONE)

Expand Down