Skip to main content

cja

A CMake-compatible build system that generates Ninja build files.

Build a project with a CMakeLists.txt using:

cja
ninja

This is equivalent to the following with CMake:

cmake -Bbuild -GNinja -DCMAKE_BUILD_TYPE=Debug \
  -DCMAKE_COLOR_DIAGNOSTICS=1 -DCMAKE_EXPORT_COMPILE_COMMANDS=1
ninja -Cbuild

Install

pip install cja

Or, if you're in a managed Python environment:

pipx install cja

Comparison to CMake

  • The build.ninja file is generated in your project root, not in the build directory. To allow multiple build configurations in parallel, the file name is <builddir>.ninja.
  • Paths are relative to the project root, while CMake uses absolute paths. This is faster, reduces output, and also reduces binary size as paths (e.g. for debug symbols) are shorter. When reading output from a Docker container, this lets you click paths and open the correct files in your local editor.
  • Instead of a separate tool like CTest, cja generates a phony test target that runs all tests as part of the Ninja build graph, so tests can start as soon as the first test binary is ready.
  • Colors for compiler diagnostics are enabled by default.
  • _builddir_/compile_commands.json is always generated.
  • More colorful, simplified output. For example, when downloading dependencies, cja shows progress bars using Rich, while CMake shows no output (or simple multi-line output when -DFETCHCONTENT_QUIET=0 is specified).

Limitations to keep cja simple:

  • Only generates Ninja build files.
  • Out-of-tree builds aren't allowed.
  • Only supports Linux, macOS, and Windows.
  • Only supports clang with a GNU-like command line on Windows.

Build Subcommand

cja supports a build subcommand, which runs ninja automatically afterward.

cja --release / cja build --release

cja --release is equivalent to:

cja -Bbuild-release -DCMAKE_BUILD_TYPE=Release

cja build --release additionally runs ninja:

cja -Bbuild-release -DCMAKE_BUILD_TYPE=Release
ninja -f build-release.ninja

Run Subcommand

cja also generates a run phony target that executes the first executable (or the one set via VS_STARTUP_PROJECT) in your CMakeLists.txt.

Metadata

Release files for cja 0.7.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cja 0.7.6
File Size Uploaded
cja-0.7.6.tar.gz 128.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cja 0.7.6
File Interpreter ABI Platform
cja-0.7.6-py3-none-any.whl Python 3 none any Details

Total release size: 266.0 kB

Release files / cja-0.7.6.tar.gz

Download URL cja-0.7.6.tar.gz
Size 128.3 kB
Tags Source
SHA-256 checksum
How to use checksums
5a286df2947b7cc67cd0d7a7a8ddf1957a6d1b09f223d0eefbd4a14974d87efe
BLAKE2b-256 checksum
How to use checksums
5771c932d8f07dbc61c05318983f80553eb4a5c211e59b257392e3647ecbcbc6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.

Transparency log

Release files / cja-0.7.6-py3-none-any.whl

Download URL cja-0.7.6-py3-none-any.whl
Size 137.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a1564cc169f5411e889731d8b715bb95eb53ff7760aa4d3ee4be552fbebeae9d
BLAKE2b-256 checksum
How to use checksums
8d00efc4970c6a3fe81be76baed1adf1bd99f3fc868ddc501a4eefdb7204ceb8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.

Transparency log

Release history Release notifications | RSS feed

0.8.1

2 release files

0.8.0

2 release files

0.7.7

2 release files

This release

0.7.6 This release

2 release files

0.7.5

2 release files

0.7.4

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page