build2 | 0.10.0 Release Notes

These notes provide a more detailed discussion of major new features, including the motivation for implementing them and their usage examples. For the complete list of changes, refer to the Release Announcement or the NEWS files in the individual packages. See also the discussion of these release notes on r/cpp/ .

Coming shortly after 0.9.0 , this is more of a maintenance release that nevertheless includes a good number of new features. It was also an opportunity to hone our release process with the overall goal of increasing the release cadence.

The CI service now includes a number of upgraded and new build machines. Specifically, GCC 8.2.0 was upgraded to 8.3.0, Clang 7.0.0 to 7.0.1, and there is now FreeBSD 12.0 with Clang 7.0.1. We've also added the new experimental build class that includes two new build machines: one with a snapshot of GCC 9 and one with MSVC 16 RC1. Overall, the CI service now has 33 build configurations; see the Build Configurations page for the complete list.

Build System

One of the more notable new features in the build system is support for an alternative build file/directory naming scheme. Now the build/*.build and buildfile filesystem entries in a project can alternatively (but consistently) be called build2/*.build2 and build2file .

The alternative naming scheme is primarily useful when adding build2 support to an existing project along with other build systems. In this case, the fairly generic standard names might already be in use. For example, it is customary to have build/ in .gitignore . Plus more specific naming will make it easier to identify files and directories as belonging to the build2 support. For new projects as well as for existing projects that are switching exclusively to build2 the standard naming scheme is still recommended.

To create a project with the alternative naming using bdep-new(1) pass the alt-naming project type sub-option. For example:

$ bdep new -t exe,alt-naming -l c++ hello

Another interesting build system improvement is support for multiple variable overrides. Now we can do:

$ b config.cxx.coptions=-O3 config.cxx.coptions=-O0

Or even:

$ b config.cxx.coptions=-O3 config.cxx.coptions+=-g

On the Windows front we now have support for MSVC 16 (2019) as well as automatic switching to option files (AKA response files) if the linker command line is too long. The latter covers both MSVC link.exe / lib.exe and MinGW gcc.exe / ar.exe .

Project Dependency Manager

The project dependency manager's bdep-new(1) command now supports the --subdirectory mode that can be used to create a new source subdirectory, normally an executable or a library, in an already existing project. For example:

$ bdep new -t bare hello $ cd hello $ bdep new --subdirectory -t lib -l c++ libhello $ bdep new --subdirectory -t lib -l c++ libextra $ bdep new --subdirectory -t exe -l c++ hello

Another improvement to the new command is support for more granular C++ source file extension specification. For example:

$ bdep new -t lib -l c++,hxx=h,cxx=cpp libhello # .h & .cpp $ bdep new -t lib -l c++,extension=?++ libhello # .h++, .c++, etc