Fast Builds With Ninja

Run the fast build backend that CMake and Meson generate for.

LinuxbuildperformancemakeLow risk
Run ninja -C build to build the targets described by build.ninja.

01Command

Command
$ ninja -C build

02What 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

RiskLow risk
Requirementssudo apt install ninja-build
!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-build
    Debian · vendor-doc · 2026-09-20
    Evidence: Debian packages Ninja (ninja-build), a small build system focused on speed.
  • Ninja
    Official project · vendor-doc · 2026-09-20
    Evidence: Debian packages Ninja (ninja-build), a small build system focused on speed.

Last verified: 2026-09-22 · Category: Developer

06Related solutions