[M4] add cargoxx run/test/clean

This commit is contained in:
2026-05-10 00:12:25 +00:00
parent f6e8699a72
commit 0a398d1c31
10 changed files with 349 additions and 0 deletions

View File

@@ -78,6 +78,15 @@ All notable changes to cargoxx will be documented in this file.
and `[build]` honoring `warnings_as_errors` and `sanitizers`. Source
paths emitted relative to `build/` (i.e. prefixed with `../`).
Output is deterministic. `tests/codegen_cmake.cpp` covers 11 cases.
- `cargoxx run [--release] [--bin <name>] [-- <args>...]`,
`cargoxx test [--release]`, and `cargoxx clean`. `run` builds first,
picks the binary (errors with the available list when the project
has multiple bins and `--bin` is omitted), and execs it with the
process exit code propagated. `test` invokes
`nix develop -c ctest --test-dir build/<profile> --output-on-failure`.
`clean` removes `build/` while leaving `Cargoxx.lock` and `flake.lock`
intact. End-to-end verified against a freshly-scaffolded project.
`tests/cmd_run.cpp` and `tests/cmd_clean.cpp` cover 6 cases.
- `cargoxx build` (without `--no-build`) now drives the full build:
`nix develop -c cmake -B build/<profile> -S build -G Ninja
-DCMAKE_BUILD_TYPE=<Profile>` then `nix develop -c cmake --build`