Skip to content

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.

Edit: also on my new workstation I can't get cprnc to find netcdf without this PR.

@jgfouca jgfouca requested a review from jedwards4b July 31, 2025 20:54
@jgfouca jgfouca self-assigned this Jul 31, 2025
@jgfouca jgfouca merged commit fd9c52c into ESMCI:main Aug 12, 2025
1 check passed
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