mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:10:52 +01:00
[PR #229] conformance build.ps1: find Visual Studio's CMake and name no Visual Studio version #282
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#282
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/229
Author: @Andretuta
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:old-pr/9962📝 Commits (2)
42e44cfconformance build.ps1: find Visual Studio's CMake and name no Visual Studio version8368be1test_conformance_build_script: pass with a non-ASCII temporary folder📊 Changes
2 files changed (+153 additions, -3 deletions)
View changed files
➕
tests/test_conformance_build_script.py(+117 -0)📝
tools/conformance/native/scripts/build.ps1(+36 -3)📄 Description
Original description (mentions and
#Nreferences are disabled; the numbers refer to the old repository):Claimed in the coordination issue as: https://github.com/ProjectLeonida/Leonida/issues/9677#issuecomment-7116616512
What and why
tools/conformance/native/scripts/build.ps1fails on a PC with only Visual Studio Build Tools:PATHorC:\Program Files\CMakeonly, so without either it ends withThe term 'C:\Program Files\CMake\bin\cmake.exe' is not recognized, although Visual Studio includes CMake. Found by evilclanker9000: https://github.com/ProjectLeonida/Leonida/issues/9401#issuecomment-7114627674Visual Studio 17 2022, which fails where only Visual Studio 2026 is installed.The script now looks for CMake in the order
scripts/build_runtime.ps1does (Visual Studio's throughvswhere, then one onPATHwith Visual Studio generators), then in%ProgramFiles%\CMake. It passes no-G, so CMake takes the newest Visual Studio it knows.CMAKE_GENERATORis unset for the configure, because-Gused to override it. With no CMake at all it prints one line and exits 1.Behaviour change: Visual Studio's CMake is now preferred to one on
PATH.negative-control.ps1has the same lookup and generator and is not changed here.Tested
Windows 11 (10.0.26200), Visual Studio 2026 Build Tools (CMake 4.1.2), Windows PowerShell 5.1, no CMake on
PATH, NVIDIA GeForce RTX 5080 (610.88 / 32.0.16.1088),main2d53a8055. AMD was not run.conform_nativewith theVisual Studio 18 2026generator, exit 0, and the result passes 36 of 36 checks (18 readback, 18 PNG).main's script exits 1 before it configures.CMAKE_GENERATOR=Ninjaset, in a clean folder and in an existing build folder.PATHwith novswhere; no CMake at all (one line, exit 1); a compile error and a configure error (exit 1).CMAKE_GENERATORis restored in the calling session.42e44cf08merged ontomaind083a2cc3(clean merge): the script builds, 36 of 36 checks pass, and the new test (5 of 5),test_conformance_run_script.py(7 of 7) and, with the executable this script built,test_conformance_native_paths.py(7 of 7) pass.tests/test_conformance_build_script.py: 5 of 5. It runs a copy of the script with stand-ins for CMake and builds nothing. Control: withmain's script, all 5 fail.tests/test_*.pyon2d53a8055: the same 28 fail as onmain, none new. The pytest-only files were not run.check_no_game_data.py,compileallandgit diff --checkare clean.scripts/verify.ps1(it expects the author's adapters).AI-assisted: yes (Claude Code)
Checklist
docs/design.md, with how it was confirmed. (Not applicable: no translator rule.)🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.