Skip to content

Comments

CMake Ensure defines for ungrib reading tools are set for all languages#280

Open
islas wants to merge 1 commit intowrf-model:developfrom
islas:cmake_missing_defines_c
Open

CMake Ensure defines for ungrib reading tools are set for all languages#280
islas wants to merge 1 commit intowrf-model:developfrom
islas:cmake_missing_defines_c

Conversation

@islas
Copy link
Contributor

@islas islas commented Jan 21, 2026

When building WPS with CMake, certain compile definitions ( USE_JPEG2000 and USE_PNG) were only being set for Fortran files. This caused issues when compiling C files that also needed these definitions.

The fix involves adding these definitions globally, ensuring they are available for all source files regardless of language. The files that are specifically affected during compilation with these changes are under the ungrib/src/ngl/g2 directory:

  • dec_jpeg2000.c / enc_jpeg2000.c
  • dec_png.c / enc_png.c

This change does not impact the make build process, and only affects CMake builds.

Addresses issue #279

When building WPS with CMake, certain compile definitions such as
`USE_JPEG2000`` and `USE_PNG`` were only being set for Fortran files.
This caused issues when compiling C files that also needed these
definitions.

The fix involves adding these definitions globally, ensuring they are
available for all source files regardless of language. The files that
are specifically affected during compilation with these changes are
under the ungrib/src/ngl/g2 directory:
* dec_jpeg2000.c / enc_jpeg2000.c
* dec_png.c / enc_png.c

This change does not impact the make build process, and only affects
CMake builds.
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.

1 participant