Task: Implement Hotfix: remaining CMake 4.4 uninitialized-variable warnings
Table of Contents
This page documents a task in the Hotfix: remaining CMake 4.4 uninitialized-variable warnings story. It captures the goal, current status, acceptance, and any notes or results.
Goal
Fix the remaining CMake 4.4.0 uninitialized-variable warnings not covered by PR #1664: two genuine use-before-define bugs, one dead-variable reference, and CPack/InstallRequiredSystemLibraries vendored-module noise.
Status
| Field | Value |
|---|---|
| State | DONE |
| Parent story | Hotfix: remaining CMake 4.4 uninitialized-variable warnings |
| Now | Nothing. |
| Waiting on | Nothing. |
| Next | Nothing. |
| Last touched | 2026-07-22 |
Acceptance
CMakeLists.txt:sprint_chartscustom target no longer reads an uninitializedSPRINTvariable — theSPRINTCACHE variable was removed entirely, sincecompass sprint chartsalready auto-detects the current sprint.CMakeLists.txt: deadDOGEN_VERSIONreference replaced withCMAKE_PROJECT_VERSION.projects/CMakeLists.txt:flagsinitialised before first use.build/cpack/CMakeLists.txt:InstallRequiredSystemLibraries=/=CPackvendored-module uninitialized warnings suppressed narrowly around their twoinclude()calls (CMake >= 4.4 only).- Verified clean (no uninitialized warnings, no errors) against a
real CMake 4.4.0 binary; full local build and
ctestpass under CMake 4.3.4.
Plan
While fixing PR #1664's vcpkg-toolchain warning batch, a real
CMake-4.4.0 configure surfaced four more uninitialized-variable
warnings out of scope for that task: two genuine use-before-define
bugs in our own CMake code, one dead-variable reference, and two more
from CMake's own bundled CPack.cmake=/=InstallRequiredSystemLibraries.cmake
modules (same vendored-module class as vcpkg's, different
include() call site).
Fixed each:
sprint_chartscustom target: initially movedset(SPRINT 18 CACHE STRING ...)beforeadd_custom_target(sprint_charts ...)so${SPRINT}would resolve to18instead of empty, but that default was already six sprints stale (current sprint is 24). Removed theSPRINTCACHE variable entirely instead — see below.DOGEN_VERSION(a dead reference, likely a leftover from before the project's current name) replaced withCMAKE_PROJECT_VERSION, which is already used elsewhere in the same file.projects/CMakeLists.txt: addedset(flags "")before first use — harmless in practice (CMake treats unset as empty) but exactly the class of bugwarnings.uninitializedexists to catch.build/cpack/CMakeLists.txt: bracketed the two vendored-moduleinclude()calls individually withcmake_diagnostic(PUSH)=/=SET CMD_UNINITIALIZED IGNORE=/=POP, guarded for CMake >= 4.4, using the correct category token learned from PR #1664's review round (CMD_UNINITIALIZED, notuninitialized).
Verified directly against a real CMake 4.4.0 binary (downloaded via
pip download cmake==4.4.0, same approach as PR #1664): fresh
configure exits clean, zero uninitialized warnings or errors.
Removed the SPRINT CACHE variable entirely rather than bumping its
stale default (18) to the current sprint (24): compass sprint
charts already auto-detects the current sprint via
current_version_sprint() when --sprint is omitted
(cmd_sprint_charts in compass.py), so the CMake-side override was
redundant and would only go stale again next sprint. Confirmed
concretely — the generated build rule now invokes compass.sh sprint
charts with no --sprint argument at all. Ran a full local build
(compass build, exit 0) and ctest --preset linux-clang-debug-make
(74/74 tests passed) under the local CMake 4.3.4 to confirm no
regressions.
Notes
Test Scenarios
Manual QA scenarios (scaffolded via compass add test_scenario, run
through the QA Validation Runner panel) that verify this task. Link
new ones here as they're created; the scenario doc itself links back
via its "Verifies task" field.
| Scenario | State | Notes |
|---|---|---|
PRs
| PR | Title |
|---|---|
| #1666 | [build] Fix remaining CMake 4.4 uninitialized-variable warnings |
Review
| # | Comment summary | File | Decision | Notes |
|---|---|---|---|---|
| 1 | Task doc left stale passages describing the discarded "reorder SPRINT" approach after the fix changed to "remove SPRINT entirely" in ce8acdfd | task_implement_cmake-44-remaining-uninitialized-warnings.org | Accepted | Fixed: updated Acceptance/Plan passages to describe the final "removed entirely" approach, no longer self-contradictory. |
Result
Fixed the four remaining CMake 4.4.0 uninitialized-variable warnings
out of scope for PR #1664: removed the redundant/stale SPRINT
CACHE variable entirely (sprint_charts now runs compass sprint
charts with no arguments, which already auto-detects the current
sprint), replaced the dead DOGEN_VERSION reference with
CMAKE_PROJECT_VERSION, initialised flags in
projects/CMakeLists.txt, and suppressed the
CPack=/=InstallRequiredSystemLibraries vendored-module warnings
narrowly around their include() calls (CMD_UNINITIALIZED, CMake
>= 4.4 only). Verified against a real CMake 4.4.0 binary (clean
configure, zero uninitialized warnings) and a full local build +
ctest (74/74 passed) under CMake 4.3.4.