Skip to content

synrad example: build usage requirements; document persisted-geometry resolution - #439

Open
wenaus wants to merge 2 commits into
BNLNPPS:synradfrom
wenaus:synrad-example-fixes
Open

synrad example: build usage requirements; document persisted-geometry resolution#439
wenaus wants to merge 2 commits into
BNLNPPS:synradfrom
wenaus:synrad-example-fixes

Conversation

@wenaus

@wenaus wenaus commented Aug 20, 2026

Copy link
Copy Markdown
Member

Two small fixes from the swf-epicprod worker integration (spack-based eic_dev_cuda container), companions to #438.

  • examples/synrad CMake: 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.hstra.h / OpticksPhoton.hh chain) arrive only where those packages sit on default compiler paths. The fix links the header-only glm::glm and plog::plog INTERFACE 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_EXPERIMENTAL via CMAKE_CXX_FLAGS.

  • docs/inputs-outputs.md: document persisted CSGFoundry geometry resolution — the GEOM=<name> plus <name>_CFBaseFromGEOM=<base> environment variable pair read by spath::CFBaseFromGEOM. CFBASE alone does not resolve geometry on this path, and the requirement was previously undocumented.

🤖 Generated with Claude Code

https://claude.ai/code/session_01L8ikLGuXqZW26wXi8RCkrf

wenaus and others added 2 commits August 20, 2026 14:19
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
Copilot AI lite review requested due to automatic review settings August 20, 2026 18:20

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 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_g4 build requirements propagation by linking glm::glm / plog::plog interface targets and setting GLM_ENABLE_EXPERIMENTAL on the example target.
  • Document persisted CSGFoundry geometry resolution using GEOM and ${GEOM}_CFBaseFromGEOM in docs/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 thread docs/inputs-outputs.md
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`:
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