Commit 91a1864
fix(build): pass CMAKE_POLICY_VERSION_MINIMUM literally on Windows
- Pass cmake args as single-quoted literals via splatting (`cmake @cmakeArgs`): the bare `-DCMAKE_POLICY_VERSION_MINIMUM=3.5` token was mangled to "3" by PowerShell's native-argument parsing (the ".5" dropped), so CMake rejected it and configure aborted at ZLToolKit's `cmake_minimum_required(VERSION 3.1.3...3.26)` — the override is required because CMake 4.x on windows-latest refuses policy versions < 3.5. Single quotes force the value through verbatim; the same =3.5 already works in the bash macOS/Linux builds.
- Add `$LASTEXITCODE` checks after vcpkg install, cmake configure, and cmake build: PowerShell's `$ErrorActionPreference=Stop` ignores native exe exit codes, so the script ran past the failed configure, packaged a junk zip, and printed a false "Build success" (the step only failed later via MSBuild's leftover exit code). Now it stops at the real failure point.
Signed-off-by: benshi <807629978@qq.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 3e45994 commit 91a1864
1 file changed
Lines changed: 21 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
54 | 55 | | |
55 | 56 | | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
68 | 76 | | |
69 | 77 | | |
70 | 78 | | |
| 79 | + | |
71 | 80 | | |
72 | 81 | | |
73 | 82 | | |
| |||
0 commit comments