refactor(build): remove deprecated WITH_SLOG and WITH_STTF guards#321
refactor(build): remove deprecated WITH_SLOG and WITH_STTF guards#321
Conversation
Remove the remaining WITH_SLOG compile definitions from sysrap and CSGOptiX. Delete the conditional logging includes, LEVEL declarations, and debug-only LOG calls in CSG::CU and OpticksPhoton now that the flag no longer controls functional behavior. This simplifies the build configuration and removes dead code without changing runtime logic.
Cpp-Linter Report
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1aa8869bc9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| #include <sstream> | ||
|
|
||
| #ifdef WITH_SLOG | ||
| #include "plog/Severity.h" |
There was a problem hiding this comment.
Preserve standalone build by guarding plog include
This unconditional plog/Severity.h include breaks the documented STANDALONE/header-only usage of OpticksPhoton.hh: the standalone compile path in sysrap/tests/OpticksPhotonSTANDALONETest.sh uses gcc $name.cc -I.. and now fails with fatal error: plog/Severity.h: No such file or directory unless callers manually add plog include paths. Before this change, the WITH_SLOG guard avoided that external dependency for standalone consumers, so this is a functional regression for non-CMake or minimal builds.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Pull request overview
This PR simplifies the build by removing the deprecated WITH_SLOG and WITH_STTF guards that were effectively always enabled, and by making the associated logging/font code paths unconditional across SysRap/CSG-related code.
Changes:
- Removed obsolete
WITH_SLOG/WITH_STTFcompile definitions from CMake and PTX build settings. - Made
SLOGusage inCSG::CUandOpticksPhotonunconditional, and always registeredSTTFTest.cc. - Deleted legacy SLOG documentation files and replaced them with short inline header notes.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
u4/CMakeLists.txt |
Minor cleanup of stale blank line near compile definitions. |
sysrap/tests/CMakeLists.txt |
Registers STTFTest.cc unconditionally in SysRap tests. |
sysrap/SLOG.rst |
Deletes legacy standalone SLOG documentation. |
sysrap/SLOG.hh |
Replaces external doc reference with short inline logging note. |
sysrap/SLOG_review.rst |
Deletes old SLOG review/design notes. |
sysrap/OpticksPhoton.hh |
Makes plog severity declaration/header dependency unconditional. |
sysrap/OpticksPhoton.cc |
Makes SLOG include and LEVEL definition unconditional. |
sysrap/OPTICKS_LOG.hh |
Adds inline note describing SLOG.hh / SLOG_INIT.hh roles. |
sysrap/CMakeLists.txt |
Removes deprecated guard variables/definitions; always installs STTF headers. |
qudarap/CMakeLists.txt |
Removes stale local-debugging comment block. |
CSGOptiX/CMakeLists.txt |
Drops deprecated guard definitions from PTX object compilation. |
CSG/CU.h |
Makes plog severity dependency unconditional in CU. |
CSG/CU.cc |
Makes SLOG include, level, and logging calls unconditional. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -27,9 +25,7 @@ struct OpticksPhoton | |||
| struct SYSRAP_API OpticksPhoton | |||
| #endif | |||
| { | |||
| #ifdef WITH_SLOG | |||
| static const plog::Severity LEVEL ; | |||
This branch removes the deprecated
WITH_SLOGandWITH_STTFcompile-time guards, which wereeffectively always enabled in the current monorepo build.
What changed
WITH_SLOGandWITH_STTFcompile definitions from CMakeSLOG-based logging paths inCSG::CUandOpticksPhotonunconditionalSTTFheaders and always registerSTTFTest.ccinstead of gating them onWITH_STTFSLOG.rstandSLOG_review.rstSLOG.hhandOPTICKS_LOG.hhWhy
These flags no longer controlled meaningful optional behavior in this codebase. Keeping them around
added conditional build logic and dead guards without providing a real configuration choice.
This change simplifies the build, makes the logging/font paths reflect actual usage, and reduces
stale documentation and scaffolding.