build2
| 0.8.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, see the Release
Announcement or the NEWS
files in the individual
packages.
Build System
The build system again saw a lot of development in this release cycle.
One of the more visible new additions is the Introduction
chapter that covers every aspect of the build infrastructure, including the
underlying concepts, for the canonical executable and library projects as
produced by bdep-new(1)
. So if the
lack of the build system documentation was (understandably) deterring you
from trying build2
out, that obstacle is now gone.
Another notable new feature is support for header-only libraries which,
in build2
, are actually handled with more general
binary-less libraries (that will also cover module interface-only
libraries in modularized codebases). And while on this subject, utility
libraries now use thin archives where available.
On the C++ modules front, build2
now handles the leading
module;
marker (introduced in P0713R1 and adopted by the merged
modules proposal). It is now also using the new GCC module mapper interface
(-fmodule-mapper
).
There are also a couple of new build system modules: in
for pre-processing .in
files and bash
that provides modularization support for bash
scripts. The
latter is a good example of using build2
for things other than
C/C++.
Project Dependency Manager
The project dependency manager, bdep(1)
, added two new
commands: bdep-ci(1)
and bdep-publish(1)
.
The ci
command allows you to submit your project to a CI
server for remote testing. To complement this command we have also setup the
free ci.cppget.org service for open
source projects. Here is an example to give you an idea:
$ bdep ci submitting: to: https://ci.cppget.org in: https://github.com/boris-kolpackov/hello.git#master@33f34830 package: hello version: 0.1.0-a.0.20180912094305.33f34830383d continue? [y/n] y ################################################################ 100.0% CI request is queued: https://ci.cppget.org/@63e77df0-5d11-4d09-b69a-2566ac6ea848
You can even visit the returned URL and view the result for the next 30 days or so. To see how all this fits into the overall development workflow, check the Hello, World section in the Toolchain Introduction.
The publish
command allows you to submit your project for
inclusion into an archive repository, such as cppget.org. To see how this works, check the
Versioning
and Release Management section in the Toolchain Introduction.
Another notable new feature is the unit testing support (in addition to
integration/functional testing that was already there) in projects produced
by the bdep-new(1)
command.
Finally, the Toolchain Introduction added the Canonical
Project Structure chapter that describes how (and why) to structure
build2
projects that you are planning to package. If you found
the build2
project layout to differ from what you are used to,
this is definitely the chapter to read.