Skip to content

Sync RogueConfig.cmake.in with CMakeLists.txt, improve custom C++ plugin docs, and add downstream find_package CI#1272

Open
ruck314 wants to merge 3 commits into
pre-releasefrom
cmake-doc_and_ci
Open

Sync RogueConfig.cmake.in with CMakeLists.txt, improve custom C++ plugin docs, and add downstream find_package CI#1272
ruck314 wants to merge 3 commits into
pre-releasefrom
cmake-doc_and_ci

Conversation

@ruck314

@ruck314 ruck314 commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Description

Synchronize the dependency-discovery logic between CMakeLists.txt and templates/RogueConfig.cmake.in, improve the custom C++ plugin documentation, and add CI coverage for the installed RogueConfig.cmake.

  • The Boost/Python/NumPy/BZip2/ZeroMQ discovery block duplicated in both files is now delimited by ROGUE_DEPENDENCY_DISCOVERY markers and verified by scripts/check_cmake_sync.sh (run from scripts/run_linters.sh), so the consumer-facing copy can no longer silently drift from the build copy.
  • The custom-module docs gain a reference page for the variables exported by RogueConfig.cmake, a corrected example CMakeLists.txt (drops the contradictory -std=c++0x flag), a bit-inverter source example, and a link from the install index.
  • A new external_build_test CI job builds a standalone project against an installed rogue via find_package(Rogue) — as both a boost.python module and a NO_PYTHON C++ executable — and verifies a custom bit-inverting stream element works, catching regressions in RogueConfig.cmake.in.

Details

The downstream fixture lives in tests/downstream/ and is shared with the documentation example. The ROGUE_* variable API is unchanged, so existing downstream projects are unaffected.

@ruck314 ruck314 changed the title build: sync RogueConfig with CMakeLists, document custom plugins, add downstream CI Sync RogueConfig.cmake.in with CMakeLists.txt, improve custom C++ plugin docs, and add downstream find_package CI Jun 23, 2026
@ruck314 ruck314 requested a review from Copilot June 23, 2026 19:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reduces drift between Rogue’s build-time dependency discovery and the installed RogueConfig.cmake, improves downstream custom C++ plugin documentation, and adds CI that validates find_package(Rogue) against an installed Rogue.

Changes:

  • Adds ROGUE_DEPENDENCY_DISCOVERY sentinels + a linter (scripts/check_cmake_sync.sh) to enforce byte-identical dependency-discovery logic between CMakeLists.txt and templates/RogueConfig.cmake.in.
  • Introduces a downstream find_package(Rogue) smoke-test fixture (tests/downstream/) and a new CI job (external_build_test) to build/verify it in both Python-module and NO_PYTHON modes.
  • Updates/expands custom-module docs, including a new page documenting variables exported by RogueConfig.cmake.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/downstream/verify_bit_inversion.py Python driver to validate the downstream BitInverter module behavior.
tests/downstream/src/BitInverter.cpp Downstream fixture module/exe exercising installed Rogue headers/libs.
tests/downstream/CMakeLists.txt Standalone downstream consumer project using find_package(Rogue).
templates/RogueConfig.cmake.in Adds sentinel markers around the duplicated dependency discovery block.
CMakeLists.txt Adds sentinel markers matching RogueConfig.cmake.in for sync enforcement.
scripts/check_cmake_sync.sh New linter to compare the delimited dependency blocks.
scripts/run_linters.sh Runs the new sync check early in CI linting.
DEVELOPMENT.md Documents the new sync requirement and enforcement mechanism.
docs/src/installing/index.rst Adds link to custom C++ extension docs.
docs/src/custom_module/index.rst Adds rogueconfig to the reading order and toctree.
docs/src/custom_module/rogueconfig.rst New reference documenting variables exported by RogueConfig.cmake.
docs/src/custom_module/makefile.rst Fixes contradictory C++ standard flags and adds explanation of find_package(Rogue) variables.
docs/src/custom_module/sourcefile.rst Replaces source example with BitInverter and links to new reference material.
docs/src/custom_module/wrapper.rst Clarifies relationship between minimal BitInverter and fuller wrapper examples.
docs/src/custom_module/testing.rst Updates narrative to match the revised example structure.
.github/workflows/rogue_ci.yml Adds external_build_test job to validate downstream find_package(Rogue) consumption.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/downstream/src/BitInverter.cpp
Comment thread docs/src/custom_module/sourcefile.rst Outdated
Comment thread docs/src/custom_module/sourcefile.rst Outdated
Comment thread scripts/run_linters.sh Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated 3 comments.

Comment thread tests/downstream/CMakeLists.txt
Comment thread tests/downstream/CMakeLists.txt
Comment thread tests/downstream/src/BitInverter.cpp

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.

Comment thread scripts/check_cmake_sync.sh Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.

Comment thread tests/downstream/verify_bit_inversion.py
… downstream CI

Keep the dependency-discovery logic in CMakeLists.txt and
templates/RogueConfig.cmake.in from drifting, improve the custom C++ plugin
documentation, and add CI coverage for the installed RogueConfig.cmake.

- Wrap the duplicated Boost/Python/NumPy/BZip2/ZeroMQ discovery block in both
  files with ROGUE_DEPENDENCY_DISCOVERY sentinel markers and add
  scripts/check_cmake_sync.sh to fail the build when the two blocks diverge.
  The check extracts each block to a temp file and diffs the files directly so
  trailing-blank-line drift is caught, runs as part of
  scripts/run_linters.sh, and the convention is documented in DEVELOPMENT.md.
  Probe numpy with the Python3 interpreter find_package(Python3) selected and
  set both BOOST_ROOT and Boost_ROOT so CMP0144 upper- and mixed-case lookups
  resolve identically.

- Fix the documented custom CMakeLists.txt example (drop the contradictory
  -std=c++0x flag in favor of CMAKE_CXX_STANDARD 14), document the variables
  exported by RogueConfig.cmake in a new custom_module/rogueconfig.rst,
  rework the custom-module source example around a bit-inverting stream
  element, and link the custom-module guide from the install index.

- Add tests/downstream/, a standalone project that consumes an installed
  rogue purely through find_package(Rogue) and builds the same bit-inverter
  two ways (boost.python module and NO_PYTHON C++ executable), each asserting
  the payload bytes are inverted. A new external_build_test CI job exercises
  both styles and gates the release, conda, and docker jobs, so a regression
  in RogueConfig.cmake.in is caught.
@ruck314 ruck314 force-pushed the cmake-doc_and_ci branch from 1372df1 to ae4946b Compare June 23, 2026 21:05
@ruck314 ruck314 requested a review from slacrherbst June 23, 2026 21:06
@ruck314 ruck314 marked this pull request as ready for review June 23, 2026 21:07
ruck314 added 2 commits June 23, 2026 14:15
The illustrative comments next to BOOST_PYTHON_CANDIDATES still referenced
python38. Bump the e.g. examples to python313 (the latest supported version)
in both CMakeLists.txt and templates/RogueConfig.cmake.in, keeping the two
ROGUE_DEPENDENCY_DISCOVERY blocks byte-identical.
@ruck314 ruck314 requested a review from bengineerd June 30, 2026 16:37
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.

2 participants