Update cmake minimum version to 3.5.1

Submitted by Hans Johnson

Assigned to Nobody

Link to original bugzilla bug (#1767)
Version: 3.4 (development)

Description

The primary reason for this updated minimum version is to minimize developer burden for the test cases.

Newer versions of cmake (greater than 3.0) add several convenient directives that require less cmake code.

Versions of cmake greater than 3.5 provide increased support for CXX11 standards compliance.

This issue is primarily to start a discussion about how much development burden should be placed on maintaining such long backward compatibility.

https://unix.stackexchange.com/questions/535052/what-cmake-version-can-i-rely-on-in-current-popular-linux-distributions

pkgs.org tells me that the available versions of CMake in the Linux distributions it knows about are as follows:

Arch Linux: 3.15.2
CentOS: 2.8.12.2 (CentOS 7 and 6)
Debian: 3.13.4 (Debian 10), 3.7.2 (Debian 9), 3.0.2 (Debian 8)
Fedora: 3.14.5 (Fedora 30 and 29)
Mageia: 3.14.3 (Mageia 7), 3.10.2 (Mageia 6)
OpenMandriva: 3.14.5 (OpenMandriva 4.0), 3.11.4 (OpenMandriva 3.0)
openSUSE Leap: 3.10.2 (this is the release-based distribution version of openSUSE)
openSUSE Tumbleweed: 3.13.4 (this is the rolling release of openSUSE)
Slackware: 3.5.2 (Slackware 14.2), 2.8.12 (Slackware 14.1), 2.8.8 (Slackware 14.0)
Ubuntu: 3.13.4 (Ubuntu 19.04), 3.10.2 (Ubuntu 18.04), 3.5.1 (Ubuntu 16.04), 2.8.12/3.5.1 (Ubuntu 14.04; 3.5.1 is available as the cmake3 package)
In addition to the above, RHEL 8 has 3.11.4; previous versions of RHEL carry the same version as CentOS (as you’d expect). EPEL carries a cmake3 package providing version 3.13.5 for CentOS and RHEL 7, and version 3.6.1 for CentOS and RHEL 6.

For non-Linux distributions:

FreeBSD: 3.14.5
NetBSD: 3.14.5
OpenBSD: 3.15.2
macOS (via Homebrew): 3.15.2
The versions above are the latest version available in each release of the given distribution, not necessarily the default version — I expect most users to be comfortable enough keeping their distribution up to date within a given release.

I don’t know what’s needed to cover 90% of the installed base. If you stick to the latest version of all distributions above, then 3.5.2 covers everything apart from CentOS, and 3.10.2 covers everything apart from CentOS and Slackware. The CentOS situation should be temporary anyway, since CentOS 8 is forthcoming, and can be worked around by using EPEL. If you want to include releases which are still in wide use, then you’re down to 2.8.12.2 since CentOS and RHEL have a large installed base (but again, see EPEL), or 3.5.1 if you want to ignore that but still include popular releases of Debian and Ubuntu.

I suspect the most popular distribution on the desktop is Ubuntu, followed perhaps by Fedora (ignoring macOS and ChromeOS); on servers, RHEL, CentOS and other RHEL derivatives, Debian, Ubuntu, and proprietary distributions used by server hosts, in some order. But it’s impossible to get reliable data. (Distrowatch’s popularity figures reflect the popularity of Distrowatch’s pages on each distribution, not the usage of each distribution).

Blocking

#814 (closed)

Edited by Eigen Bugzilla