Commit Graph

3 Commits

Author SHA1 Message Date
Brad King
8dc97acb03 cmake_minimum_required: Tolerate unknown future arguments
When a `...<max>` version is given that is larger than the running
version of CMake, assume that the project is aware of a newer version of
CMake and that any unknown arguments are future arguments.  This will
allow future versions of CMake to add arguments to the command that
projects can use without introducing errors in older versions of CMake
(back to 3.12).
2018-03-26 11:31:08 -04:00
Brad King
45408b5ea1 cmake_minimum_required: Optionally set policies with version range
Teach `cmake_minimum_required` and `cmake_policy(VERSION)` to support a
version range of the form `<min>[...<max>]`.  Define this to mean that
version `<min>` is required, but known policies up to those introduced
by `<max>` will be set to `NEW`.  This will allow projects to easily
specify a range of versions for which they have been updated.
2018-03-21 08:00:28 -04:00
Brad King
7d47c69365 Drop compatibility with CMake < 2.4
Drop all behavior activated by setting CMAKE_BACKWARDS_COMPATIBILITY to
a value lower than 2.4, and generate an error when projects or the user
attempt to do so.  In the error suggest using a CMake 2.8.x release.

Teach cmake_minimum_required to warn about projects that do not require
at least CMake 2.4.  They are not supported by CMake >= 3.0.

Replace the documentation of CMAKE_BACKWARDS_COMPATIBILITY with a
reference to policy CMP0001.
2013-10-23 08:54:31 -04:00