[GH-ISSUE #3412] [Other] ctest ggml_tq_overlay: cmake/ggml_tq_overlay_test.cmake fails under CMake 3.x (IN_LIST without CMP0057 in -P mode) #1383

Closed
opened 2026-11-04 01:50:51 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @Norhiro on GitHub (Oct 20, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3412

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).

Originally created by @Norhiro on GitHub (Oct 20, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/3412 ### 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).
Author
Owner

@Niko1221 commented on GitHub (Oct 27, 2026):

Thanks. Confirmed: the -P script sets no policy, so IN_LIST is not an operator under CMake 3.x. Fixed in 0.2.7 with cmake_policy(SET CMP0057 NEW).

Release: https://github.com/Niko1221/Strata/releases/tag/v0.2.7

<!-- gh-comment-id:6445912317 --> @Niko1221 commented on GitHub (Oct 27, 2026): Thanks. Confirmed: the -P script sets no policy, so IN_LIST is not an operator under CMake 3.x. Fixed in 0.2.7 with cmake_policy(SET CMP0057 NEW). Release: https://github.com/Niko1221/Strata/releases/tag/v0.2.7
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#1383
No description provided.