Minimum CMake version


In order to support Intel MPI better, I’d like to bump the FindMPI in VTK to the version that is provided by CMake 3.17. However, some of this logic is only available in CMake 3.12 (namely the SHELL: syntax for linker flags). Does anyone have a problem with bumping VTK’s minimum CMake version to 3.12 on master only? This would include bumping it for consumers of VTK as well. VTK currently requires CMake 3.8.x as a minimum version. The last patch release for the 3.8 series was released in May 2017 and the 3.8.0 release was in April 2017.

Survey of Linux distro versions:

  • Ubuntu 16.04 - 3.5 (already too old)
  • Ubuntu 18.04 - 3.10 (would be out-of-date)
  • Ubuntu 19.04 - 3.13 (OK)
  • Debian oldstable - 3.7 (already too old; 3.13 in backports)
  • Debian stable - 3.13 (OK)
  • RHEL 6 - 2.8.12 (already too old)
  • RHEL 7 - 2.8.12 (3.14 in EPEL)
  • RHEL 8 - 3.11 (would be out-of-date)
  • Fedora, Arch, etc. - Probably fine :slight_smile:

A fallback option is to just hide MPI support if 3.12 is not available (we can message if it was requested though). Enabling MPI would make us have a 3.12 minimum for consumers then, 3.8 otherwise. I don’t know if that’s a nicer behavior or not; folks are going to end up just needing 3.12 in the general case anyways.

I have no problem with bumping CMake to 3.12 so +1 from me.

Here’s a proof-of-concept for bumping the minimum:

Any objections to bumping on master? I’d like to merge this by the end of the week if not.

1 Like

I worried OpenBSD’s cmake might be older, but 6.6 has at least cmake 3.15.3.

Didn’t we see someone running cmake 3.9 here :


Listed in the main post; EPEL has 3.14 available. The base system is still 2.8 (!), so I don’t know where 3.9 comes from (a devtoolset maybe?).

Ok, I’m fine with upgrading, but maybe not in VTK9 release.

Ok, I’m fine with upgrading, but maybe not in VTK9 release.

Upgrading sounds good to me too, but doing it in VTK 9 release would be problematic for us, as we still need to build packages for Ubuntu 18.04 for a while. We’ll eventually migrate to Ubuntu 20.04 (out in a couple of weeks), but the migration is going to take quite some time.

It would be awkward to have to carry patches to make VTK build with CMake 3.10.2. Not impossible of course, but it would be a problem.

That was never proposed.

1 Like

My bad. Thanks Ben.

I’ll merge at the end of the day (in 4 hours or so) if I don’t hear any objections.

And merged.

Builds Ok: VTk and VTKExamples on both Windows and Linux. No problems.

Andrew Maclean