build2 | C/C++ Build Toolchain

build2 is an open source (MIT), cross-platform build toolchain that aims to approximate Rust Cargo's convenience for developing and packaging C/C++ projects while providing more depth and flexibility, especially in the build system.

build2 is a hierarchy of tools consisting of a general-purpose build system, package manager (for package consumption), and project manager (for project development). It is primarily aimed at C/C++ projects as well as mixed-language projects involving one of these languages (see bash and rust modules, for example).

Key features:

Next-generation, Cargo-like integrated build toolchain but with more depth.

Covers entire project lifecycle: creation, development, testing, and delivery.

Aims to be able to build the entire C/C++ ecosystem from the ground up.

Uniform and consistent interface across all platforms and compilers.

Fast, multi-threaded build system with parallel building and testing.

First-class Windows support, including portable build recipes.

Archive and version control-based package repositories.

Dependency-free, all you need is a C++ compiler.

Starting a new project is as easy as:

$ bdep new -t exe -l c++ hello $ cd hello $ bdep init -C ../hello-gcc cc config.cxx=g++

Or to start hacking on an existing project (this time on Windows):

> git clone ssh://example.org/hello.git > cd hello > bdep init -C ..\hello-msvc cc config.cxx=cl

To get started, see the Toolchain Introduction and Installation Instructions. Alternatively, if you prefer to watch and listen, the CppCon 2018 presentation provides a good overview. To learn more about the project see the Documentation page.