fix(tools): configure the build tree in build.bat when it is missing #6

Open
github-bot wants to merge 1 commit from github-bot/gh-6 into main AGit
Owner

@⁠marquezinii on GitHub · 2026-11-23 12:19 UTC · original
marquezinii:fix/build-bat-configure → main · +6 −0 · 1 files · 1 commits · open

tools\verify.bat is the build/test command given in README.md, CONTRIBUTING.md and AGENTS.md, but on a fresh clone it fails before compiling anything:

> git clone https://github.com/jadeowaowa/scarlett-layer.git && cd scarlett-layer
> .\tools\verify.bat --verbose
Error: C:/.../scarlett-layer/build is not a directory

build.bat only runs cmake --build build. The configure step (cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug) exists only in .github/workflows/ci.yml, so the documented command works only on machines that already have a configured build\ directory.

This change makes build.bat run that same configure step when build\CMakeCache.txt does not exist, then build as before. Existing build trees are not reconfigured, and the arguments passed to cmake --build are unchanged. CI does its own configure step and is not affected.

Verification

Windows 11, VS Build Tools 18 (MSVC), RTX 5070. Each run used a fresh git clone with no build\ directory, from a plain shell (no developer prompt, so build.bat takes the vswhere/vcvars path):

  • Before (main @ 7a7a092): .\tools\verify.bat --verbose exits 1 with build is not a directory.
  • After (this branch): .\tools\verify.bat --output-on-failure configures build\ with Ninja/Debug, builds, and ctest reports 100% tests passed, 0 tests failed out of 78.
  • Running .\tools\build.bat again on the now-configured tree skips the configure step (ninja: no work to do.).
  • py tools\generate_status.py --check passes (nothing it tracks changed).
**@⁠marquezinii** on GitHub · 2026-11-23 12:19 UTC · [original](https://github.com/jadeowaowa/scarlett-layer/pull/6) `marquezinii:fix/build-bat-configure` → `main` · +6 −0 · 1 files · 1 commits · open `tools\verify.bat` is the build/test command given in README.md, CONTRIBUTING.md and AGENTS.md, but on a fresh clone it fails before compiling anything: ``` > git clone https://github.com/jadeowaowa/scarlett-layer.git && cd scarlett-layer > .\tools\verify.bat --verbose Error: C:/.../scarlett-layer/build is not a directory ``` `build.bat` only runs `cmake --build build`. The configure step (`cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug`) exists only in `.github/workflows/ci.yml`, so the documented command works only on machines that already have a configured `build\` directory. This change makes `build.bat` run that same configure step when `build\CMakeCache.txt` does not exist, then build as before. Existing build trees are not reconfigured, and the arguments passed to `cmake --build` are unchanged. CI does its own configure step and is not affected. ## Verification Windows 11, VS Build Tools 18 (MSVC), RTX 5070. Each run used a fresh `git clone` with no `build\` directory, from a plain shell (no developer prompt, so `build.bat` takes the vswhere/vcvars path): - Before (`main` @ 7a7a092): `.\tools\verify.bat --verbose` exits 1 with `build is not a directory`. - After (this branch): `.\tools\verify.bat --output-on-failure` configures `build\` with Ninja/Debug, builds, and ctest reports `100% tests passed, 0 tests failed out of 78`. - Running `.\tools\build.bat` again on the now-configured tree skips the configure step (`ninja: no work to do.`). - `py tools\generate_status.py --check` passes (nothing it tracks changed).
build.bat only ran `cmake --build build`, so `tools\verify.bat` (the build
command given in README.md, CONTRIBUTING.md and AGENTS.md) failed on a fresh
clone with "build is not a directory". The configure step only existed in
the CI workflow.

When build\CMakeCache.txt is absent, configure with the same options as CI
(`-G Ninja -DCMAKE_BUILD_TYPE=Debug`) before building. Existing build trees
are left as they are.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:42:46 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/6/head:github-bot/gh-6'
git switch 'github-bot/gh-6'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-6'
git switch 'github-bot/gh-6'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-6'
git switch 'github-bot/gh-6'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-6'
git switch 'main'
git merge --squash 'github-bot/gh-6'
git switch 'main'
git merge --ff-only 'github-bot/gh-6'
git switch 'main'
git merge 'github-bot/gh-6'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.