Skip to content

Commit 7d1cf4a

Browse files
knaufinatorclaude
andauthored
fix(app,ci): set CMAKE_POLICY_VERSION_MINIMUM=3.5 for fetched deps (#26)
The "Build Desktop App (CMake)" CI job began failing at Configure with: CMake Error at build/_deps/cjson-src/CMakeLists.txt:2 (cmake_minimum_required): Compatibility with CMake < 3.5 has been removed from CMake. cJSON v1.7.18 (fetched via FetchContent) still declares a pre-3.5 cmake_minimum_required. The GitHub Windows runner upgraded to the CMake that ships with Visual Studio 2026 (CMake >= 4.0), which removed compatibility with that old policy version, so configuration aborts before any of our code builds. Set CMAKE_POLICY_VERSION_MINIMUM=3.5 before FetchContent so the fetched subprojects adopt a still-supported policy floor. The variable is read by each subproject's cmake_minimum_required and is silently ignored on CMake < 3.31, so local builds on older toolchains are unaffected. No functional change. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent fb91c4a commit 7d1cf4a

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

app/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ project(stewart-platform LANGUAGES C CXX)
44
set(CMAKE_CXX_STANDARD 17)
55
set(CMAKE_CXX_STANDARD_REQUIRED ON)
66

7+
# Some fetched deps (e.g. cJSON v1.7.18) still declare cmake_minimum_required
8+
# < 3.5, which CMake >= 4.0 (the VS 2026 CI runner) rejects outright. Provide a
9+
# compatible policy floor so those subprojects still configure. This variable is
10+
# read by each subproject's cmake_minimum_required; it is silently ignored on
11+
# CMake < 3.31, so it is safe for older local toolchains too.
12+
set(CMAKE_POLICY_VERSION_MINIMUM 3.5)
13+
714
# ── Fetch dependencies ──────────────────────────────────────────────
815
include(FetchContent)
916

0 commit comments

Comments
 (0)