Peter Dimov
Boris Kolpackov wrote:
That may be true, but if you took a vote among all the Boost users asking them which build system Boost should drop, I think it's pretty clear what the large majority's answer would be.
If we supported build2 and CMake and we took that same vote, I'm fairly sure what the answer would be, too.
Yes, at this stage the answer to "CMake vs X" is clear for any X. But in case of build2 I believe you would at least be able give some tangible reasons as to why you are supporting both.
From my point of view, some examples are
b2 toolset=msvc-14.3,gcc warnings=extra warnings-as-errors=on
or
b2 toolset=msvc-14.0,msvc-14.1,msvc-14.2,msvc-14.3 cxxstd=14,latest variant=debug,release
or
b2 toolset=gcc,clang undefined-sanitizer=norecover
or
b2 libs/something/test
where that last line doesn't need a separate run with -DBUILD_TESTING=ON, or -DBOOST_INCLUDE_LIBRARIES=something, or a separate ctest run, all test types are supported equally well, and everything is automatically parallelized.
The common theme for these examples is the fundamental limitations of meta-build systems compared to native build systems: - Meta-build systems are limited by the underlying build systems (make, ninja, msbuild, etc) that they must delegate to. - Meta-build systems partition the build graph into two disjoint (or poorly joint) sub-graphs: configuration/project generation and build proper (in a sense, this is the same problem as "recursive make considered harmful"). So maybe the insights here are: 1. It's unfortunate that the C++ community has largely settled on a meta-build system. 2. In a complex project like Boost there will always be a need for a native build system to accommodate more advanced use-cases. And, FWIW, all of the examples you have shown can be done with build2. The mental model is a bit different and some things are a bit more verbose at the moment, but the fundamentals like the ability to build with multiple compilers in the same build system invocation or automatically pull what's necessary is there. BTW, can b2 do something like this: b2 host-toolset=gcc host-variant=release toolset=aarch64-linux-gnu-gcc variant=debug And then build tools used during the build (like Qt moc) with (host) GCC while the rest with (target) GCC cross-compiler?