Skip to content

frontend: isolate CMake platform setup behind per-OS macros - #1584

Merged
zackees merged 2 commits into
masterfrom
infra/889-frontend-cmake-platform
Oct 21, 2026
Merged

zackees merged 2 commits into
masterfrom
infra/889-frontend-cmake-platform

Conversation

@zackees

@zackees zackees commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Summary

Fixes #889. Move the listed frontend CMake host branches into the existing per-OS files, retaining one include dispatch and the original setup stages/scope.

RED

c362372 adds ci/test_frontend_cmake_facade.py. The focused run has four failing facade/boundary checks; all 17 configure-time characterization scenarios pass against the original shared files. Coverage includes Windows/macOS/Linux/Flatpak/FreeBSD/OpenBSD, Qt 6.10/6.11/6.12 macOS behavior, missing browser support, disabled WhatsNew, relocatable paths and stage ordering.

GREEN and validation

48a4436 selects one per-OS file, which defines five setup operations. Shared files invoke them at the existing Qt, plugin path/source, WhatsNew and native-source stages. Macros preserve caller variable scope. The Linux include directory is captured when the selected file loads, retaining the appdata helper location after deferred execution.

  • All 86 focused CMake/scope/build-group/ratchet checks pass.
  • All 17 configure-time scenarios retain expected platform sources/dependencies, Qt 6.11-only macOS GuiPrivate, Linux/BSD DBus, Flatpak/BSD loaders, browser/WhatsNew gating and AppImage relocation paths. The fixture rejects setup side effects during the initial platform include.
  • Normalized native setup bodies match their originals apart from the captured Linux include directory.
  • Pinned gersemi and diff whitespace checks pass.
  • Full native validation 39529561107 has passed every native Windows/macOS/Linux app build, Qt frontend check, native Rust tests and all Tier 2 tests on GREEN. PR CI 39529557057 passed. Flatpak also passed; the complete full validation run succeeded. This is a behavior-preserving CMake refactor; no Rust port, user-visible feature, public C header, existing C test, new workflow or WebSocket gitlink change.

The existing platform-ifdef JSON ratchet covers C/C++, not CMake. No applicable JSON count exists to lower. The focused guard enforces zero host branches in the three shared feature files and allows the single include dispatch in frontend/CMakeLists.txt.

Resumed after the Windows prerequisite

The original full run 39524526040 was canceled after Windows Tier 2 failed on the unrelated output-delay test's cm_print_error link dependency (#1580). I released this issue, repaired that prerequisite in #1591, and reclaimed #889 after #1591 merged. Its native Windows job proved the real output-delay executable links and passes against both C and Rust libobs.

This facade branch is now rebased onto c120ac2. Current RED/GREEN commits are c362372 and 48a4436. All 86 focused checks and formatting pass again. New PR run 39529557057 and full native run 39529561107 validate this exact rebased head; the earlier canceled full run is not completion evidence. All native app builds and native test jobs passed, and PR CI passed. Required native validation is complete; Flatpak also passed; the complete full validation run succeeded.

@zackees
zackees force-pushed the infra/889-frontend-cmake-platform branch from 97c4273 to 48a4436 Compare October 21, 2026 01:49
@zackees
zackees marked this pull request as ready for review October 21, 2026 02:06
@zackees
zackees added this pull request to the merge queue Oct 21, 2026
Merged via the queue into master with commit 5ab6e96 Oct 21, 2026
52 checks passed
@zackees
zackees deleted the infra/889-frontend-cmake-platform branch October 26, 2026 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

facade: frontend CMake (CMakeLists.txt, cmake/*.cmake): move 5 platform if-chains (12 branches) into per-platform cmake files

1 participant