Boost logo

Boost :

Subject: Re: [boost] [cmake] Minimum viable cmakeification for Boost
From: Peter Dimov (lists_at_[hidden])
Date: 2017-06-21 10:58:07


Thomas Heller wrote:

> People who prefer declarative builds can stick to Boost.Build.

That's missing the point. Declarative build descriptions are preferable in
any build system, and any serious use of one leads inevitably to this same
conclusion. Witness, for instance, how Meson intentionally makes its
language not Python, even though it's very much Python-looking, and how
Bazel also has its own language. This is because if the language is Python,
people are encouraged to program in it, instead of declaring targets.

Target declarations compose, logic that manipulates global environment
doesn't.

Now it's true that the declarative approach is sometimes less convenient.
Imperatively, you just check whether zlib is installed, #define or not
HAVE_ZLIB and build different things based on that. Whereas the alternative
is to have a separate zlib-support library target, which injects a .cpp file
into the main program via usage-requirements, which registers the zlib
support with the main library. But, the upside is that if everyone writes
their build descriptions properly, you just link to the appropriate targets
in the root build file and everything "just works".


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