Commit 7577a52
fix(build): move CMAKE_POLICY_VERSION_MINIMUM into a -C cache file
- Pass the policy override via a CMake initial-cache file (`-C $workDir/policy-min.cmake` containing `set(CMAKE_POLICY_VERSION_MINIMUM 3.5 CACHE STRING "" FORCE)`) instead of `-D...=3.5`: the prior single-quote/splat fix (91a1864) still wasn't enough — PowerShell's native-arg parser reads the `3.5` as a number and splits the token into `...=3` + `.5` (CMake logs `Ignoring extra path from command line: ".5"` and then rejects the leftover value "3"). Keeping the decimal inside a .cmake file means CMake parses it itself and PowerShell never tokenizes it.
- The `-C` cache loads before the first listfile pass, so it covers the top-level cmake_minimum_required (CMakeLists.txt:24), ZLToolKit, and the vcpkg toolchain's cmake_policy calls — all of which were failing on the mangled value. Override still needed because ZLToolKit/ZLMediaKit declare cmake_minimum_required(VERSION 3.1.3...3.26) and CMake 4.x dropped <3.5 policy compat.
Signed-off-by: benshi <807629978@qq.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 91a1864 commit 7577a52
1 file changed
Lines changed: 12 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
58 | | - | |
59 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
60 | 68 | | |
61 | 69 | | |
| 70 | + | |
62 | 71 | | |
63 | | - | |
64 | 72 | | |
65 | 73 | | |
66 | 74 | | |
| |||
0 commit comments