CMake-compatible build system that generates Ninja build files
Project description
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.ninjafile 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
testtarget 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.jsonis 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=0is 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 build --release
Equivalent to calling:
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cja-0.2.2.tar.gz.
File metadata
- Download URL: cja-0.2.2.tar.gz
- Upload date:
- Size: 68.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
372d9608f0657c8f0c4d4fd539580958bf4cfeb5b283d451ea30b82c910c593e
|
|
| MD5 |
2af930958dba508cfa84c3deac4e0505
|
|
| BLAKE2b-256 |
890d8ade1ad0f7cf127e3e6498eb1ef2b3eb84f5a479d6707f7d26baf142af28
|
Provenance
The following attestation bundles were made for cja-0.2.2.tar.gz:
Publisher:
release.yml on jhasse/cja
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cja-0.2.2.tar.gz -
Subject digest:
372d9608f0657c8f0c4d4fd539580958bf4cfeb5b283d451ea30b82c910c593e - Sigstore transparency entry: 1087040285
- Sigstore integration time:
-
Permalink:
jhasse/cja@29b4815adea41d358172c836f261a897e1c2e34e -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/jhasse
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@29b4815adea41d358172c836f261a897e1c2e34e -
Trigger Event:
push
-
Statement type:
File details
Details for the file cja-0.2.2-py3-none-any.whl.
File metadata
- Download URL: cja-0.2.2-py3-none-any.whl
- Upload date:
- Size: 74.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f20b91d17f389f9e94ffcd7b9cc59e6fe1d6055ed24ff24e1e2899ee21c17c29
|
|
| MD5 |
1306d8ea792ea333f593ee87748b2289
|
|
| BLAKE2b-256 |
5c9987ed2e2bb3657e3bb7dfaec93d9bc14661c1464a67f844d3dd8460a473a4
|
Provenance
The following attestation bundles were made for cja-0.2.2-py3-none-any.whl:
Publisher:
release.yml on jhasse/cja
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cja-0.2.2-py3-none-any.whl -
Subject digest:
f20b91d17f389f9e94ffcd7b9cc59e6fe1d6055ed24ff24e1e2899ee21c17c29 - Sigstore transparency entry: 1087040365
- Sigstore integration time:
-
Permalink:
jhasse/cja@29b4815adea41d358172c836f261a897e1c2e34e -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/jhasse
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@29b4815adea41d358172c836f261a897e1c2e34e -
Trigger Event:
push
-
Statement type: