Story: Hotfix: CMake 4.4 uninitialized-variable warnings on Linux CI
Table of Contents
This page documents a story in Sprint 24. It captures the goal, current status, acceptance criteria, and the tasks that compose it.
Goal
GitHub Actions Linux CI builds started emitting a batch of new
CMake Warning (uninitialized) messages starting 2026-07-20, under
CMake 4.4.0:
CMake Warning (uninitialized) at .../CMakeDetermineSystem.cmake:231 (configure_file): uninitialized variable 'CMAKE_SYSTEM_CUSTOM_CODE' CMake Warning (uninitialized) at .../CMakeDetermineCXXCompiler.cmake:41 (if): uninitialized variable 'CXX' CMake Warning (uninitialized) at .../CMakeDetermineCXXCompiler.cmake:60 (set): uninitialized variable '_CMAKE_TOOLCHAIN_PREFIX' CMake Warning (uninitialized) at .../CMakeDetermineCompiler.cmake:39 (set): uninitialized variable 'CMAKE_CXX_COMPILER_HINTS' CMake Warning (uninitialized) at .../CMakeDetermineCompilerId.cmake:27 (string): uninitialized variable 'CMAKE_CXX_COMPILER_ARG1'
All five originate from the project(OreStudio ...) call at
CMakeLists.txt:51, tripped inside CMake 4.4.0's own bundled
CMakeDetermineSystem.cmake=/=CMakeDetermineCXXCompiler.cmake=/
=CMakeDetermineCompiler.cmake=/=CMakeDetermineCompilerId.cmake
modules on the GitHub Actions Linux runner. Likely candidates: a
GitHub Actions runner image bump that picked up CMake 4.4.0 fresh
(new/renamed internal variables these modules now read before
anything sets them), or a change on our side to how the Linux
workflow invokes =cmake=/sets up the toolchain that stopped
initializing something these modules expect. Investigate the root
cause and fix or suppress appropriately — determine whether this is
purely cosmetic (CI noise) or symptomatic of something not being
configured that should be.
Status
| Field | Value |
|---|---|
| State | DONE |
| Parent sprint | Sprint 24 |
| Now | Nothing. |
| Waiting on | Nothing. |
| Next | Nothing. |
| Last touched | 2026-07-22 |
Acceptance
- Root cause identified: what changed around 2026-07-20 that introduced these warnings (runner image / CMake version bump vs. a workflow-side regression).
- Confirmed whether the warnings are purely cosmetic or indicate a real missing/misconfigured toolchain variable.
- Linux CI builds no longer emit these warnings (fixed at the source) or, if they're confirmed both upstream and harmless, explicitly and narrowly suppressed with a comment explaining why.
Tasks
| Task | State | Start | End | Description |
|---|---|---|---|---|
| Investigate and fix vcpkg-toolchain uninitialized-variable warnings | DONE | 2026-07-22 | 2026-07-22 | Fix the vcpkg.cmake batch of CMake Warning (uninitialized) messages under CMake 4.4.0 (VCPKG_MANIFEST_DIR, VCPKG_BOOTSTRAP_OPTIONS, VCPKG_OVERLAY_TRIPLETS, Z_VCPKG_FEATURE_FLAGS), all originating from the project(OreStudio …) call at CMakeLists.txt:51. |
Decisions
- Root cause: the 2026-07-20 Dependabot bump of
lukka/get-cmaketo 4.4.0 newly enforces our ownwarnings.uninitialized: truepreset duringproject()'s compiler/toolchain-detection phase, surfacing both this batch and vcpkg's toolchain-file batch of warnings — same trigger, same fix. - Fixed by narrowly suppressing the
uninitializeddiagnostic only around theproject(OreStudio ...)call (guarded for CMake >= 4.4), rather than disabling the preset globally or pinning CI back to CMake 4.3.4 — keeps the warning active for our own code everywhere else.