add flags to report warnings as errors on debug builds#686
Conversation
|
📄 Documentation for this branch is available at: https://ncar.github.io/musica/branch/address_warnings/ |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #686 +/- ##
==========================================
+ Coverage 81.12% 81.39% +0.27%
==========================================
Files 65 112 +47
Lines 7538 9837 +2299
==========================================
+ Hits 6115 8007 +1892
- Misses 1423 1830 +407
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This pull request adds compiler flags to treat warnings as errors in debug builds and updates dependencies. It modifies the CMake configuration to enable -Werror (or /WX for MSVC) for debug builds, excludes the NVHPC debug build from CI due to unavoidable compiler warnings, updates the TUV-x dependency to a specific commit hash, and replaces std::strcpy with memcpy in one location to address a compiler warning.
- Enables
-Werrorflag for debug builds to catch warnings early - Updates TUV-x dependency from v0.13.0 tag to a specific commit hash
- Replaces
std::strcpywithmemcpyin util.cpp to eliminate a warning
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/util.cpp | Replaces std::strcpy with memcpy for string copying |
| cmake/setup_musica_target.cmake | Adds -Werror (or /WX for MSVC) compiler option for debug builds |
| cmake/dependencies.cmake | Updates TUVX_GIT_TAG from version tag to specific commit hash |
| .github/workflows/docker.yml | Excludes NVHPC debug builds from CI matrix due to unavoidable warnings |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Requires NCAR/tuv-x#150 to be merged so I can update the tag, but this removes warnings and adds some cmake to report warnings as errors