Repository navigation
Let Ninja generate the old-tree fixture of TestOptionsConfiguration (#514) - #515
Conversation
… and check it with Ninja (#514)
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 41 minutes. View limit details
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
There was a problem hiding this comment.
Note
Copilot was unable to complete this review at the selected tier due to model policy or plan restrictions.
🟡 Changes recommended
A moderate-severity active finding remains in test/cmake/CheckTestOptions.cmake where the Ninja regression/upgrade fixture has misleading comments and fragile detection that may skip coverage or fail to assert the Ninja generator, so the change needs corrections before approval.
1 open issue
What changed in this PR
Fixes TestOptionsConfiguration failing under Ninja by making the “old tree” fixture a valid CMake project and by explicitly exercising the upgrade path with Ninja when available.
Changes:
- Add
project(TestOptions LANGUAGES NONE)to theOLD_TREEfixture branch so generators like Ninja can generate the build tree. - Update
CheckTestOptions.cmaketo re-run the old-tree upgrade with-G Ninjawhen Ninja is detected, reducing dependence on the machine’s default generator.
| File | Description |
|---|---|
| test/cmake/test-options/CMakeLists.txt | Ensures the OLD_TREE fixture declares a minimal project(... LANGUAGES NONE) so Ninja can generate the build tree before the early return. |
| test/cmake/CheckTestOptions.cmake | Adds an additional old-tree upgrade/configure pass using -G Ninja when Ninja is available to keep the regression coverage independent of the default generator. |
Review effort: Balanced
…its other names (#514)

Closes #514.
Problem
TestOptionsConfigurationfailed when Ninja was the default generator (CMAKE_GENERATOR=Ninja): theOLD_TREEbranch oftest/cmake/test-options/CMakeLists.txtreturned before anyproject(), and Ninja refuses to generate such a tree ("The detected version of Ninja () is less than the version of Ninja required").Changes
project(TestOptions LANGUAGES NONE)before returning; the former options are still declared withoption(), so their cache entries stay typedBOOL.CheckTestOptions.cmakerepeats the old-tree upgrade with-G Ninjawhen Ninja is installed, so the case no longer depends on the machine's default generator.Tests
CMAKE_GENERATOR=Ninjaand with the default generator; with the fixture change reverted, the new step fails ("old build tree with Ninja: status 1") under the default generator.ctest -R "^TestOptionsConfiguration$"passes.CMAKE_GENERATOR=Ninja.Not run