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
Open
Sync RogueConfig.cmake.in with CMakeLists.txt, improve custom C++ plugin docs, and add downstream find_package CI#1272ruck314 wants to merge 3 commits into
ruck314 wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
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_DISCOVERYsentinels + a linter (scripts/check_cmake_sync.sh) to enforce byte-identical dependency-discovery logic betweenCMakeLists.txtandtemplates/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 andNO_PYTHONmodes. - 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.
… 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.
1372df1 to
ae4946b
Compare
# Conflicts: # templates/RogueConfig.cmake.in
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Synchronize the dependency-discovery logic between
CMakeLists.txtandtemplates/RogueConfig.cmake.in, improve the custom C++ plugin documentation, and add CI coverage for the installedRogueConfig.cmake.ROGUE_DEPENDENCY_DISCOVERYmarkers and verified byscripts/check_cmake_sync.sh(run fromscripts/run_linters.sh), so the consumer-facing copy can no longer silently drift from the build copy.RogueConfig.cmake, a corrected exampleCMakeLists.txt(drops the contradictory-std=c++0xflag), a bit-inverter source example, and a link from the install index.external_build_testCI job builds a standalone project against an installed rogue viafind_package(Rogue)— as both a boost.python module and aNO_PYTHONC++ executable — and verifies a custom bit-inverting stream element works, catching regressions inRogueConfig.cmake.in.Details
The downstream fixture lives in
tests/downstream/and is shared with the documentation example. TheROGUE_*variable API is unchanged, so existing downstream projects are unaffected.