What
Identify and remove the legacy/new dual-structure branch in the 996-line root CMakeLists.txt. Leave a single, canonical CMake build path. After this PR, no part of CMakeLists.txt (or any module it include()s) maintains a "legacy fallback" code path.
Why
The root CMakeLists.txt is bloated to 996 lines primarily because it carries two parallel build configurations: the new structured layout and a legacy fallback that activates when the new layout is "missing." After sub-issue # stabilises the source layout, the fallback branch can never trigger in normal builds — keeping it alive only adds review burden, drift surface, and confusion.
Removing the fallback is the single biggest win toward the EPIC's "decompose CMake" objective: it slashes the file by an estimated 30–40% before any other refactor.
Where
CMakeLists.txt (the legacy/new branching is in the root file, but verify whether any module it include()s carries duplicated branches)
- Possibly
cmake/<existing>.cmake modules if they mirror the dual structure
How
Technical Approach
- Read
CMakeLists.txt end-to-end and tag the legacy/fallback branches. Common signatures: if(EXISTS ...) checks for the old paths, else() branches that name core/, internal/, etc., redundant add_library(...) calls inside an if/else.
- Confirm with
git log --follow CMakeLists.txt that the fallback was added in a known migration commit and is safe to remove.
- Delete the fallback branch and any surrounding scaffolding (cached variables, comment blocks describing the dual layout).
- Verify the remaining single path still builds end-to-end.
- Do NOT replace any of the structured logic with new patterns; this PR is a deletion, not a redesign. Replacing the hardcoded source list with globbing belongs to sub-issue #; the full CMake decomposition belongs to sub-issue #.
Dependencies
- Blocked by: src/impl consolidation sub-issue (must merge first so the fallback's path references are no longer load-bearing).
Acceptance Criteria
Estimated Size
M. Deletion-only at the syntax level, but the legacy branch is interleaved with structured logic — careful reading required.
Part of #674
What
Identify and remove the legacy/new dual-structure branch in the 996-line root
CMakeLists.txt. Leave a single, canonical CMake build path. After this PR, no part ofCMakeLists.txt(or any module itinclude()s) maintains a "legacy fallback" code path.Why
The root
CMakeLists.txtis bloated to 996 lines primarily because it carries two parallel build configurations: the new structured layout and a legacy fallback that activates when the new layout is "missing." After sub-issue # stabilises the source layout, the fallback branch can never trigger in normal builds — keeping it alive only adds review burden, drift surface, and confusion.Removing the fallback is the single biggest win toward the EPIC's "decompose CMake" objective: it slashes the file by an estimated 30–40% before any other refactor.
Where
CMakeLists.txt(the legacy/new branching is in the root file, but verify whether any module itinclude()s carries duplicated branches)cmake/<existing>.cmakemodules if they mirror the dual structureHow
Technical Approach
CMakeLists.txtend-to-end and tag the legacy/fallback branches. Common signatures:if(EXISTS ...)checks for the old paths,else()branches that namecore/,internal/, etc., redundantadd_library(...)calls inside anif/else.git log --follow CMakeLists.txtthat the fallback was added in a known migration commit and is safe to remove.Dependencies
Acceptance Criteria
if(...legacy...)/if(EXISTS old_path)branches remain inCMakeLists.txtadd_library(...)calls per targetCMakeLists.txtmeasurably reduced (target: at least 200 lines off — concrete number reported in PR body)Estimated Size
M. Deletion-only at the syntax level, but the legacy branch is interleaved with structured logic — careful reading required.
Part of #674