Subject: Re: [boost] Strawman proposals for CMake support
From: paul (pfultz2_at_[hidden])
Date: 2017-07-19 14:39:21
On Wed, 2017-07-19 at 14:37 +0200, Raffi Enficiaud via Boost wrote:
> Le 19.07.17 Ã 03:09, Louis Dionne via Boost a Ã©crit :
> > Hi,
> > I'd like to expose two strawman proposals for adding CMake support
> > to Boost. Both proposals would solve the following problems, with
> > different advantages and disadvantages:
> > (1) Users have a hard time integrating Boost into their build system,
> > Â Â Â Â which is CMake more often than not.
> > (2) Prospective Boost developers are sometimes driven away from
> > Â Â Â Â submitting because they would have to learn Boost.Build, which
> > Â Â Â Â is not widely used and has a limited knowledge base.
> > FIRST PROPOSAL
> > ==============
> > The first proposal is to move completely to CMake and to render
> > Boost.Build support optional. The possible rollout plan would
> > look something like:
> > 1. We start requiring that new libraries support both Boost.Build
> > Â Â Â and CMake.
> > 2. We start adding CMake support to existing libraries.
> > Â Â Â This will take time.
> > 2.1 We start moving our infrastructure to be CMake-based.
> > 3. We release Boost with dual support for a while, letting time
> > Â Â Â for things to bake.
> > 4. We remove the requirement that Boot libraries can be built
> > Â Â Â with B2. Libraries (existing and new ones) are free to provide
> > Â Â Â such support, but they are not required to.
> > This would bring CMake to the status of "primary" build system
> > for Boost. This could be based on Paul Fultz's work in progress
> > at . This has the following advantages (in the long term):
> > - Less technical debt because we only have one "official" build
> > Â system to maintain.
> > - The build system is uniform across all of Boost, which means
> > Â it's easier for folks to maintain it and understand it.
> > - It gives maximal flexibility to CMake-based users.
> > However, it has the following drawbacks:
> > - We'll need to do a wholesale migration to build system XYZ when
> > Â CMake is not cool anymore.
> > - It's harder to get buy-in from some developers that love
> > Â Boost.Build
> I personally believe that "anything" between the tool (cmake orÂ
> boost.build) and the developers should be avoided, whether it is a "goodÂ
> idea" or not. So I will not be in favour of libraries such as, noÂ
> offense (**), BCM.
The point of BCM is not to abstract away the tool(although some developers
would like it to do that). Only to provide some functions for the boilerplate
in involved in generation of package configuration, to help provide
consistency with the testing, and provide support for documentation(ss cmake
does not provide modules for boost documentation).
> I would welcome a tool that dissects the Jamfiles and generates even aÂ
> rough/approximate CMakeLists.txt to start with.
> But I would "really" rather focus on the interface between theÂ
> superproject and the libraries, and among the libraries themselves toÂ
> cover the inner dependencies (flow of information basically: expectedÂ
> targets, naming conventions, build variants, etc).
I think any cmake should follow closely this:
> Concerning the infrastructure, it would be good to list what should beÂ
> addressed there (servers, doc generation, runners, CI, dashboard, etc).Â
> I believe most of the people do not know what it involves, and we sadlyÂ
> lost Rene in this.
> To summarize: I would like to focus on the "CMakeLists.txt" interfaceÂ
> rather than the implementation, because this is the big unknown to meÂ
> right now, and the infrastructure should receive enough attentionÂ
> otherwise it will kill the intent.
> I can volunteer for the infrastructure.
> (**) (just in case my wording for "excluding" a proposal is notÂ
> inclusive enough.)
> > SECOND PROPOSAL
> > ===============
> > The second proposal is to make Boost into an almost build-system
> > agnostic collection of libraries. Basically,
> > 1. Provide CMake package config files for all Boost libraries so that
> > Â Â Â they can be used from CMake (either automatically, manually, or a
> > Â Â Â mixture of both). This could be based on Peter Dimov's work at 
> > Â Â Â (or , not sure which one is most current).
> > 2. Make it possible to build CMake-based projects from Boost.Build, or
> > Â Â Â the other way around, or provide a build system agnostic script to
> > Â Â Â build all of Boost. This way, Boost libraries can decide whether
> > Â Â Â they want to support B2 or CMake.
> This sounds to me like designing a "build generator" (*) ... for aÂ
> "build generator" (boost.build or cmake). Or a meta-builder for aÂ
> meta-builder ...
> The idea itself might be appealing but sounds bad in the end. If theÂ
> intent is to ease the development and shipping of boost libraries, thenÂ
> adding a layer between the developer and cmake core functionalities isÂ
> not helping, and the tool will be just a subset of what cmake can do.
> To summarize: I do not like this proposal.
> (*) choose the name of your liking
> > This has the following advantages:
> > - Possibly easier to implement
> > - We could possibly support other build systems too (e.g. if a
> > Â Boost author really wants to use scons for his/her library)
> > - We don't have to do a wholesale move to XYZ when CMake is not
> > Â cool anymore
> > I see the following disadvantages:
> > - Boost's infrastructure could grow more complex as a result
> > - Our build system would be less uniform
> > - We would have to depend on all the build systems that we want
> > Â Boost libraries to be usable with
> > My personal preference is towards the first option, since I
> > think it would be simpler in the long term. I could certainly
> > be convinced otherwise.
> > There are probably other ways we can solve problems (1) and (2)
> > exposed above. There are also certainly advantages and
> > disadvantages that I forgot to mention above. I'd love to get
> > some feedback on those two approaches and see whether one of
> > them (or something else completely) can get some consensus on
> > this list.
> > Cheers,
> > Louis
> > : https://github.com/boost-cmake/bcm
> > : https://github.com/pdimov/boost-cmake-demo-2
> > : https://github.com/pdimov/boost-cmake-demo
> > --
> > View this message in context: http://boost.2283326.n4.nabble.com/Strawman-
> > proposals-for-CMake-support-tp4696989.html
> > Sent from the Boost - Dev mailing list archive at Nabble.com.
> > _______________________________________________
> > Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/b
> > oost
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boo
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk