Pull requests / #3015
#3015 build: pin CMP0169 OLD around FetchContent_Populate (CMake 4.4 warns on every configure)
open · @Buddychek · 0 Kommentare · Auf GitHub
AMD / HIPNVIDIA / CUDASecurityWindows
Beschreibung
## Title build: pin CMP0169 OLD around FetchContent_Populate (CMake 4.4 warns on every configure) Issue: Resolves # ## Summary CMake 4.4 prints an AUTHOR_WARNING on every configure: `Calling FetchContent_Populate(strata_llamacpp) is deprecated` (policy CMP0169, FetchContent.cmake:1968; sites CMakeLists.txt:1461 and sycl/CMakeLists.txt:179). The project's `cmake_minimum_required(VERSION 3.24)` does not set CMP0169, so it stays OLD and warns; setting it NEW makes the call a FATAL_ERROR. The fix pins the old behaviour, guarded so CMake < 3.30 (no such policy) still configures. ## What changed - `CMakeLists.txt` - `if(POLICY CMP0169) cmake_policy(SET CMP0169 OLD) endif()` before `FetchContent_Declare`, with the reason in a comment. - `sycl/CMakeLists.txt` - the same guarded pin at its FetchContent site. - `tools/test_fetchcontent_policy.py` - new guard test (unittest, no build, no GPU): every `FetchContent_Populate` call is preceded by the pin, and the pin is guarded, not bare. ## Extra Notes **Why not `FetchContent_MakeAvailable`** (checked, not assumed): the populate-then-`add_subdirectory` form is deliberate - ggml's binary dir is `/ggml`, the same one the `STRATA_GGML_DIR` branch uses (CMakeLists 1452/1463, sycl 170/181, metal 88). `MakeAvailable` with `SOURCE_SUBDIR ggml` moves it to `_deps/strata_llamacpp-build`, and `EXCLUDE_FROM_ALL` in `FetchContent_Declare` is only honoured from CMake 3.28 - above this project's 3.24 floor, where it would change the target graph. **Measured on this PC (CMake 4.4, Windows, no GPU build of the fetched deps):** - Reconfigure: warning gone, `Configuring done` / `Generating done`, exit 0. - Target graph unchanged: the File-API reply carries 109 files, 88 target name+config entries identical before and after the pin (hash suffixes move only with file content). - `cmake --build build --config Release --target strata_kernels_cpu` exit 0, `.lib` produced. - `tools/test_fetchcontent_policy.py`: 3/3 OK (red before the pin, green after). **Not built:** the CUDA, HIP and SYCL branches - `icpx` and ROCm are not on this machine. The sycl edit is the same guarded policy plus a comment; it is not compiled here. Default path untouched: no target, flag, source file or default value changes.
Mehr auf der Site
Links zu Install, Modellen, Releases.