Skip to content

Control verbosity of debug output via build config - #58

Merged
robertbartel merged 7 commits into
NOAA-OWP:masterfrom
robertbartel:f/build_improvements/control_verbosity
Aug 4, 2026
Merged

Control verbosity of debug output via build config#58
robertbartel merged 7 commits into
NOAA-OWP:masterfrom
robertbartel:f/build_improvements/control_verbosity

Conversation

@robertbartel

Copy link
Copy Markdown
Contributor

Note this depends on #57 and should remain in draft status until that PR is finished.

Control verbosity of debug output using CMake variable DEBUG_VERBOSITY, rather than hard coding.

Removals

  • Hard-coded setting of TOPMODEL_DEBUG

Changes

  • CMake build adjusted to accept a DEBUG_VERBOSITY variable and use that to set the TOPMODEL_DEBUG macro via compile definition.

Checklist

  • PR has an informative and human-readable title
  • Changes are limited to a single goal (no scope creep)
  • Code can be automatically merged (no conflicts)
  • Code follows project standards (link if applicable)
  • Passes all existing automated tests
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output)
  • Placeholder code is flagged / future todos are captured in comments
  • Visually tested in supported browsers and devices (see checklist below 👇)
  • Project documentation has been updated (including the "Unreleased" section of the CHANGELOG)
  • Reviewers requested with the Reviewers tool ➡️

Testing checklist

Target Environment support

  • Windows
  • Linux
  • Browser

Accessibility

  • Keyboard friendly
  • Screen reader friendly

Other

  • Is useable without CSS
  • Is useable without JS
  • Flexible from small to large screens
  • No linting errors or warnings
  • JavaScript tests are passing

@robertbartel robertbartel added the enhancement New feature or request label Feb 17, 2026
@robertbartel
robertbartel force-pushed the f/build_improvements/control_verbosity branch 5 times, most recently from 2744a24 to 61f3c89 Compare February 17, 2026 16:12
@robertbartel
robertbartel force-pushed the f/build_improvements/control_verbosity branch from ec52aa8 to 65f508e Compare March 5, 2026 15:18
@robertbartel
robertbartel marked this pull request as ready for review August 4, 2026 19:27
Setting macro TOPMODEL_DEBUG via new CMake DEBUG_VERBOSITY variable,
rather than hard-coding directly within topmodel.h.
Applying verbosity controls via TOPMODEL_DEBUG macro to a statment in
topmodel.c hat brings the "subcat" as read from the config file.
Comment thread .gitignore Outdated
# Misc #
########
make_and_run_bmi.sh
.idea

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.

Put this sort of thing in your globally configured Git ignore file: https://stackoverflow.com/a/22885996/90002 - e.g. ~/.config/git/ignore, rather than something repo-specific, since the use of IDEA isn't repo-specific

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@robertbartel
robertbartel force-pushed the f/build_improvements/control_verbosity branch from 65f508e to 770f29d Compare August 4, 2026 19:33
Comment thread docs/BMI_ADAPTION.md Outdated
Comment thread CMakeLists.txt Outdated
# Use 1 by default when build type is "Debug"
if (NOT DEFINED DEBUG_VERBOSITY AND "${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
set(DEBUG_VERBOSITY 1)
# Use 0 by default for any build types other than "Debug"

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.

The comment positioning/formatting here is confusing, since it appears to be inside the preceding block, rather than annotating the following

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed; not sure why I did that. Fixed.

PhilMiller
PhilMiller previously approved these changes Aug 4, 2026

@PhilMiller PhilMiller 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.

Minor concerns, but this does what it needs to.

Rewording slightly per suggestion.

Co-authored-by: Phil Miller - NOAA <pmiller@lynker.com>
@robertbartel
robertbartel merged commit 2bc610a into NOAA-OWP:master Aug 4, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants