synrad example: build usage requirements; document persisted-geometry resolution - #439
Open
wenaus wants to merge 2 commits into
Open
synrad example: build usage requirements; document persisted-geometry resolution#439wenaus wants to merge 2 commits into
wenaus wants to merge 2 commits into
Conversation
synrad_g4 takes include directories from the imported simphony targets without linking their libraries, so it never inherits usage requirements: glm, plog, and GLM_ENABLE_EXPERIMENTAL (needed by the sphoton.h header chain) arrive only where those packages sit on default compiler paths. Link the header-only glm::glm and plog::plog INTERFACE targets and declare the definition on the target, so the example configures anywhere the core packages do (e.g. spack-based containers) with no flag injection. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L8ikLGuXqZW26wXi8RCkrf
Document the environment variable pair required by spath::CFBaseFromGEOM to load a persisted CSGFoundry geometry: GEOM=<name> plus <name>_CFBaseFromGEOM=<base dir>. CFBASE alone does not resolve geometry on this path, and the requirement was previously undocumented. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L8ikLGuXqZW26wXi8RCkrf
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves the portability of the examples/synrad build by ensuring synrad_g4 inherits needed header-only usage requirements via target links (rather than relying on default compiler include paths), and it adds documentation for how persisted CSGFoundry geometry directories are resolved at runtime via environment variables.
Changes:
- Fix
synrad_g4build requirements propagation by linkingglm::glm/plog::ploginterface targets and settingGLM_ENABLE_EXPERIMENTALon the example target. - Document persisted CSGFoundry geometry resolution using
GEOMand${GEOM}_CFBaseFromGEOMindocs/inputs-outputs.md.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| examples/synrad/CMakeLists.txt | Ensure synrad_g4 gets required include paths and compile definitions via interface target linking. |
| docs/inputs-outputs.md | Document the env-var based resolution mechanism for persisted CSGFoundry geometry directories. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+36
to
+38
| Service-style applications (consumers of `CSGOptiXService`) load a persisted | ||
| CSGFoundry geometry directory instead of importing GDML. Resolution is by an | ||
| environment variable pair, implemented in `spath::CFBaseFromGEOM`: |
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.
Two small fixes from the swf-epicprod worker integration (spack-based eic_dev_cuda container), companions to #438.
examples/synrad CMake:
synrad_g4takes include directories from the imported simphony targets without linking their libraries, so it never inherits usage requirements — glm, plog, andGLM_ENABLE_EXPERIMENTAL(needed by thesphoton.h→stra.h/OpticksPhoton.hhchain) arrive only where those packages sit on default compiler paths. The fix links the header-onlyglm::glmandplog::plogINTERFACE targets (includes propagate, no libraries linked, preserving the header-only design) and declares the definition on the target. Verified in the container: the example configures and builds against a branch install with no flag injection, where it previously required-I<glm> -I<plog> -DGLM_ENABLE_EXPERIMENTALviaCMAKE_CXX_FLAGS.docs/inputs-outputs.md: document persisted CSGFoundry geometry resolution — the
GEOM=<name>plus<name>_CFBaseFromGEOM=<base>environment variable pair read byspath::CFBaseFromGEOM.CFBASEalone does not resolve geometry on this path, and the requirement was previously undocumented.🤖 Generated with Claude Code
https://claude.ai/code/session_01L8ikLGuXqZW26wXi8RCkrf