Skip to content

Replace generate.sh with a regenerate-proxies CMake target - #27

Merged
jwinarske merged 1 commit into
mainfrom
jw/generate-proxies-cmake
Jul 13, 2026
Merged

Replace generate.sh with a regenerate-proxies CMake target#27
jwinarske merged 1 commit into
mainfrom
jw/generate-proxies-cmake

Conversation

@jwinarske

@jwinarske jwinarske commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Replace generate.sh with a regenerate-proxies CMake target

Move proxy generation into CMake (cmake/GenerateProxies.cmake): a
regenerate-proxies target runs the in-tree sdbus-c++-xml2cpp tool over the
interface->proxy map, then formats the output with the existing
scripts/clang-format.sh, exactly as generate.sh did.

The target is deliberately opt-in and NOT part of the default build. The proxy
headers are committed to the repo, and wiring generation into the build via
add_custom_command OUTPUTs would rewrite tracked source files on a normal build (a fresh build makes the tool newer than the committed headers, so they would regenerate). Regenerate explicitly instead:

cmake --build build --target regenerate-proxies

Verified: building the target reproduces the committed src/proxy/ byte-for-byte (empty git diff), and a normal build leaves src/proxy/ untouched. The single source of truth for the interface->proxy mapping now lives in the CMake module. README and the new-service checklist updated; generate.sh removed.

Move proxy generation into CMake (cmake/GenerateProxies.cmake): a
regenerate-proxies target runs the in-tree sdbus-c++-xml2cpp tool over the
interface->proxy map, then formats the output with the existing
scripts/clang-format.sh, exactly as generate.sh did.

The target is deliberately opt-in and NOT part of the default build. The proxy
headers are committed to the repo, and wiring generation into the build via
add_custom_command OUTPUTs would rewrite tracked source files on a normal build
(a fresh build makes the tool newer than the committed headers, so they would
regenerate). Regenerate explicitly instead:

    cmake --build build --target regenerate-proxies

Verified: building the target reproduces the committed src/proxy/ byte-for-byte
(empty git diff), and a normal build leaves src/proxy/ untouched. The single
source of truth for the interface->proxy mapping now lives in the CMake module.
README and the new-service checklist updated; generate.sh removed.

Signed-off-by: Joel Winarske <[email protected]>
@jwinarske
jwinarske merged commit 8811a6f into main Jul 13, 2026
6 checks passed
@jwinarske
jwinarske deleted the jw/generate-proxies-cmake branch July 13, 2026 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant