Boost logo

Boost :

From: Boris Kolpackov (boris_at_[hidden])
Date: 2024-03-22 15:23:08


Andrey Semashev via Boost <boost_at_[hidden]> writes:

> But you're still including headers from other libraries, and your own
> headers as well (which is what I'm seeing in your linked project's
> headers), so the benefit from importing std is questionable.

The linked project is a bit confusing in that it includes both
header-based and modular implementations side-by-side. The modular
one is here:

https://github.com/boris-kolpackov/async_simple/tree/CXX20Modules-build2/async_simple_module

There are very few header includes AFAICS, which are C headers plus
<c*> wrappers.

But I agree adopting `import std;` would probably make more sense
for greenfield projects, at least initially.

> And let's not forget that in order for the `import std;` to work,
> including in mixed usage scenario when part of the code includes headers
> and part uses modules, compiler and standard library developers had to
> do their part.

Yes, Clang already supports this, albeit only in the header first,
module second order. So this works:

#include <iostream>
import std;

> I'm not sure what that might be. Both b2 and CMake get the job done,
> which is they support configuring, building and testing code. That's
> pretty much the extent of what I expect from a build system.

Well, there is also install/uninstall (with the ability to distinguish
between for-install/for-development during update) and preparation of
source distributions. But I agree, the ones you have listed are the
primary functions of a build system.

> There are, of course, things other than that, like fetching dependencies
> or building distro packages or deploying to a server, but in my opinion,
> these things are out of scope of what I call a build system.

True, though they are closely related and some of them you won't be
able to implement without adequate support in the build system. For
example, building distro packages without install support would be
pretty painful. Likewise, fetching dependencies would often involve
conditions (as in, conditional dependencies) with the input for the
conditions (information about target platform, compiler, etc) best
supplied by the build system. So I think when looking for a new build
system for Boost it would be strange not to ask how it improve the
dependency management.


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