Skip to content

Consolidate build options USE_G2CLIB_HIGH and USE_G2CLIB_LOW into single option USE_G2CLIB#499

Merged
AlysonStahl-NOAA merged 18 commits intoNOAA-EMC:developfrom
AlysonStahl-NOAA:as_build3
Feb 26, 2026
Merged

Consolidate build options USE_G2CLIB_HIGH and USE_G2CLIB_LOW into single option USE_G2CLIB#499
AlysonStahl-NOAA merged 18 commits intoNOAA-EMC:developfrom
AlysonStahl-NOAA:as_build3

Conversation

@AlysonStahl-NOAA
Copy link
Copy Markdown
Collaborator

Part of #497

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Consolidates the two CMake build options USE_G2CLIB_HIGH and USE_G2CLIB_LOW into a single USE_G2CLIB option, aligning code, build logic, CI, Spack packaging, and user documentation with the simplified configuration.

Changes:

  • Replaced USE_G2CLIB_HIGH / USE_G2CLIB_LOW preprocessor guards with USE_G2CLIB across the C sources and generated headers.
  • Updated CMake logic and GitHub Actions workflows to use USE_G2CLIB.
  • Updated Spack variants/dependencies and the user guide build-options table to reflect the consolidated option.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
wgrib2/wgrib2_meta.h.in Replaced old g2clib macros with USE_G2CLIB in generated metadata header.
wgrib2/wgrib2.c Switched g2clib-related compilation guards to USE_G2CLIB.
wgrib2/unpk.c Switched g2clib include guard to USE_G2CLIB.
wgrib2/jpeg_pk.c Switched g2clib include guard to USE_G2CLIB.
wgrib2/init.c Switched g2clib initialization guards to USE_G2CLIB.
wgrib2/config.h.in Replaced old g2clib macros with USE_G2CLIB in generated config header.
wgrib2/aec_pk.c Switched g2clib include guard to USE_G2CLIB.
wgrib2/Misc.c Updated -g2clib option gating from HIGH to consolidated USE_G2CLIB.
wgrib2/Grib.c Switched g2clib include guard to USE_G2CLIB.
wgrib2/GDT.c Switched g2clib guard to USE_G2CLIB.
wgrib2/Config.c Updated g2clib guards; removed -g2clib 2 availability line from -config output.
wgrib2/CMakeLists.txt Simplified g2c link logic to key off USE_G2CLIB.
spack/package.py Adjusted variant availability/dependencies to introduce +g2c for develop.
docs/user_guide.md Consolidated documentation table rows into USE_G2CLIB.
CMakeLists.txt Replaced two options with USE_G2CLIB; simplified g2c find_package logic.
.github/workflows/developer.yml Updated CI configuration to pass -DUSE_G2CLIB=ON.
.github/workflows/MacOS.yml Updated CI configuration to pass -DUSE_G2CLIB=ON.
.github/workflows/Linux_options.yml Updated options matrix to use -DUSE_G2CLIB=ON.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread wgrib2/Config.c
Comment thread docs/user_guide.md Outdated
Comment thread docs/user_guide.md Outdated
Comment thread spack/package.py Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 19 out of 19 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread CMakeLists.txt
Comment thread .github/workflows/Linux_options.yml
Comment thread .github/workflows/Intel.yml Outdated
@AlysonStahl-NOAA AlysonStahl-NOAA marked this pull request as ready for review January 31, 2026 02:03
@AlysonStahl-NOAA AlysonStahl-NOAA merged commit 45635e9 into NOAA-EMC:develop Feb 26, 2026
18 checks passed
@AlysonStahl-NOAA AlysonStahl-NOAA deleted the as_build3 branch February 26, 2026 21:33
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.

3 participants