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). While the ultimate goal is a
universal build toolchain, the current focus is on C/C++ (which is the
foundation of every software stack in use today) as well as mixed-language
projects involving one of these languages (see bash
and rust
, for
example).
Key features:
- Integrated build toolchain designed from first principles.
- Covers entire project lifecycle: creation, development, testing, and delivery.
- Aims to rebuild the entire C/C++ software 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.
See also:
- What is
build2
? - What is the end goal?
- Why not to use
build2
? - How does
build2
compare to other build systems (CMake, Bazel, etc)? - How does
build2
compare to other package managers (Conan, Vcpkg, etc)?
Starting a new project with build2
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.