Skip to content

Allow fallback to find_library/find_path for netcdf #25

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bartgol
Copy link
Contributor

@bartgol bartgol commented Mar 5, 2025

If netcdf libs are not installed as cmake packages, the call to find_package may fail (it depends on which FindNetCDF.cmake script is picked up, I think).

I'm not sure if this PR is desired, but on my laptop I can't get CIME to build cprnc without these mods. For some reason, the call to find_package fails. Setting CMAKE_FIND_DEBUG_MODE=ON, I can see that it doesn't use any FindNetCDF.cmake module, and therefore it can only rely on NetCDFConfig.cmake (and similar) files, which do not exist in my installation.

This PR allows us to still find netcdf if libs/includes are there, but we don't have the cmake config file. We simply look for libs/includes separately, then create the interface target.

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