Fast Builds With Ninja
Run the fast build backend that CMake and Meson generate for.
Run ninja -C build to build the targets described by build.ninja.
01Command
Command
$ ninja -C build02What it does
Ninja is deliberately minimal: it reads build.ninja and executes the dependency graph with almost no overhead, which is why CMake and Meson use it as their generator. The -C flag changes into the build directory first.
03Risk
!Warning: Writing build.ninja by hand is error-prone; generate it with CMake or Meson rather than editing it.
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- Debian package: ninja-buildEvidence: Debian packages Ninja (ninja-build), a small build system focused on speed.
- NinjaEvidence: Debian packages Ninja (ninja-build), a small build system focused on speed.
Last verified: 2026-09-22 · Category: Developer