Issues / #3412
#3412 [Other] ctest ggml_tq_overlay: cmake/ggml_tq_overlay_test.cmake fails under CMake 3.x (IN_LIST without CMP0057 in -P mode)
open · @Norhiro · 0 comments · View on GitHub
Description
### Area
[Other] (anything else, including setup and installation)
### Desktop app, Terminal or source?
Source (START-HERE.bat, setup.sh or a build)
### What happened
Expected: ctest `ggml_tq_overlay` passes with any CMake the project accepts (`cmake_minimum_required(VERSION 3.24)`). Actual: it fails with CMake 3.31.
When the build is configured with CMake 3.31, ctest runs the overlay check with that same `cmake -P` and it stops at the first `IN_LIST`:
```
CMake Error at .../cmake/ggml_tq_overlay_test.cmake:16 (if):
if given arguments:
"_n" "MATCHES" "^mmq-config-" "OR" "_n" "IN_LIST" "_patched"
Unknown arguments specified
```
(CMake also warns that policy CMP0057 is not set.) A `-P` script has no `cmake_minimum_required`, so CMake 3.x applies the OLD behaviour of CMP0057 and `IN_LIST` is not an operator. The top-level `CMakeLists.txt` asks for `cmake_minimum_required(VERSION 3.24)`, so 3.24–3.31 can configure the tree and then fail this test. CMake 4.x always has CMP0057 NEW. The same script with CMake 4.4.3 (the version in `requirements-build.txt`) prints `-- ggml_tq_overlay_test: ok`.
**Suggested change:** add `cmake_policy(SET CMP0057 NEW)` (or `cmake_minimum_required(VERSION 3.24)`) at the top of `cmake/ggml_tq_overlay_test.cmake`. `cmake/strata_ggml_tq_overlay.cmake`, which it includes, has no `IN_LIST`, and at configure time it runs under the project's own policies. Not tested with 3.31 beyond the error above.
### Smallest steps or command that reproduce it
```
cmake-3.31 -DLLAMA=<llama.cpp at 3cf03257> -DOUT=/tmp/ovl -P cmake/ggml_tq_overlay_test.cmake # error
cmake-4.4 -DLLAMA=<llama.cpp at 3cf03257> -DOUT=/tmp/ovl -P cmake/ggml_tq_overlay_test.cmake # ok
```
### Reproduction status
Reproduced locally
### Strata version
Strata 0.2.0-beta · engine 0.1.45.3 (source, commit `3d1fb480`). `main` on 2026-10-20 has the same line 16.
### Graphics card, memory and system
Fedora 44, CMake 3.31.10 (pip) and 4.4.3 (pip), llama.cpp `3cf03257` (the pinned commit, unmodified).Related on this site
Quick links to related pages.