Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake PnetCDF Find Package #2145

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from
Open

Conversation

islas
Copy link
Collaborator

@islas islas commented Dec 18, 2024

TYPE: enhancement

KEYWORDS: cmake, pnetcdf

SOURCE: internal

DESCRIPTION OF CHANGES:
Problem:
The CMake build does not support PnetCDF detection and thus the external/io_pnetcdf/ code cannot be built.

Solution:
Write a FindPnetCDF.cmake package that provides the appropriate imported target to link against and does precursory library matching if there is a dependency on netCDF C. Update the cmake code in external/io_pnetcdf/ to build, with minor adjustments that make the CMake and Make builds compatible.

The package uses the same rules of the netCDF packages, utilizing pnetcdf-config in the PATH as the source of information, or otherwise found via standard find_package() mechanics, e.g. PnetCDF_ROOT.

TESTS CONDUCTED:

  1. Tested CMake and Make builds with PnetCDF in environment on local machine and Derecho.

RELEASE NOTE: CMake PnetCDF Find Package

When PnetCDF is configured to use netCDF, the find module will
appropriately locate this netCDF if possible to identify via
pnetcdf-config information, but the current built then continues
to find netCDF-Fortran. This may be co-located with a different
version of netCDF which may result in conflicting linking of
the netCDF library where used.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant