build: temporarily map Release builds to RelWithDebInfo#234
build: temporarily map Release builds to RelWithDebInfo#234
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the top-level CMake configuration for eic-opticks to adjust how CMAKE_BUILD_TYPE is set, aiming to prefer a debuggable optimized configuration.
Changes:
- Adds logic that forces
CMAKE_BUILD_TYPEfromReleasetoRelWithDebInfounder certain conditions. - Keeps the existing defaulting of
CMAKE_BUILD_TYPEtoDebugwhen unset for single-config generators.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| # Default CMAKE_BUILD_TYPE=Debug for single-config generators (Ninja/Makefiles) when not specified | ||
| if(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE) | ||
| set(CMAKE_BUILD_TYPE Debug CACHE STRING "Build type") | ||
| else() | ||
| # Temp fix: Force RelWithDebInfo even if user specified Release | ||
| if(CMAKE_BUILD_TYPE STREQUAL "Release") | ||
| set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Build type" FORCE) | ||
| endif() |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0ecd361bb8
ℹ️ 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".
| else() | ||
| # Temp fix: Force RelWithDebInfo even if user specified Release | ||
| if(CMAKE_BUILD_TYPE STREQUAL "Release") | ||
| set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Build type" FORCE) |
There was a problem hiding this comment.
Preserve PRODUCTION define when remapping Release
For single-config builds where users request -DCMAKE_BUILD_TYPE=Release, this forces RelWithDebInfo, which means $<$<CONFIG:Release>:PRODUCTION> in sysrap/CMakeLists.txt no longer applies and the code is compiled through many #ifndef PRODUCTION debug/non-production paths. That changes runtime behavior (not just symbol/debug info) for what callers explicitly asked to be a Release build, which can impact performance and experiment behavior.
Useful? React with 👍 / 👎.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
No description provided.