Boost logo

Boost :

From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2021-06-03 10:02:59


On 6/3/21 11:03 AM, Paul A Bristow via Boost wrote:
>> -----Original Message-----
>> From: Boost <boost-bounces_at_[hidden]> On Behalf Of Peter Dimov via Boost
>> Sent: 2 June 2021 17:32
>> To: boost_at_[hidden]
>> Cc: Peter Dimov <pdimov_at_[hidden]>
>> Subject: [boost] CMake minimum version to support
>>
>> I suppose the time has come to have the discussion on the minimum CMake version we will support
> for
>> building Boost. Currently that's set to 3.5, which kind of works, but is fairly inconvenient.
>>
>> The interesting options are
>>
>> - CMake 3.8: required for use of the compile features
>> cxx_std_11, cxx_std_14, cxx_std_17, etc. Also allows
>> source_group(TREE, which is used by Json and
>> PropertyTree.
>>
>> - CMake 3.9: required by Nowide, I'm not sure why.
>> Also, required for FindMPI to define an imported
>> target. Building Boost.MPI is optional though.
>>
>> - CMake 3.13: required for Boost installation support.
>>
>> - CMake 3.14: required for FindPython to be modern
>> enough to make building Boost.Python reasonably
>> easy. (Building Boost.Python is optional, though.)
>>
>> There are also less important nice-to-have things such as
>>
>> - CMake 3.10: adds include_guard()
>> - CMake 3.12: adds CONFIGURE_DEPENDS to file(GLOB
>> - CMake 3.15: adds VERBOSE/DEBUG to message(
>>
>> Opinions?
>
> Assuming that installing/updating Cmake is easy, I would suggest that we fix the Cmake requirement
> at the most recent version of CMake released at the time of the Boost release date.

Upgrading a package in a Linux distro outside a package repository is
not as easy. I mean, yes, you could do it Windows way and just unzip an
archive with a new version somewhere in the system and use it, but this
is not the recommended thing to do as the system becomes unmaintainable
and broken over time. You want a package built for your distro, and
uploaded in a repository so that users are able to keep their systems
updated. And the repository has to be trusted (i.e. preferably, from the
distro maintainers). The last point is especially important for build
and developer machines.

This is why on distros with periodic release model the software does not
get installed from anywhere but the distro repositories, and you may be
locked to particular versions until you upgrade to the next distro release.

> Including instructions on how to update CMake for popular platforms in the Boost 'how-to-install'
> instructions would be really helpful - and fend off moaners.
>
> That is a simple enduring policy and needs no discussion (like this one) on each release.
>
> This matches what we do for b2 - always rebuild for each Boost release.
>
> KISS!
>
> Paul
>
> PS I assume there are no 'backward compatibility' issues with enforcing a CMake update.

Actually, there are. CMake does make backward incompatible changes from
time to time. It usually provides config options to choose the old or
new behavior, but those are intended as a transition means and are
removed after some time. It is possible that different projects on the
system might require different behaviors, and if CMake is ungraded to a
version that removes the compatibility knob, some projects may become
unbuildable.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk