Open edwardhartnett opened 4 years ago
I think this is worth pursuing; I don't recall why we didn't use it, either it didn't exist at the time, or we didn't know about it, but either way, adding this support makes sense.
@WardF @edhartnett https://github.com/NOAA-EMC/CMakeModules/blob/develop/Modules/FindNetCDF.cmake Care to take a look and see if this works for the NetCDF community?
It works for C
, Fortran
and C++
NetCDF API's
It also works when they are all installed in the same location or distributed.
@aerorahul perhaps you could submit a PR with this change? That would be the logical next step...
On another project it was pointed out to me that there is a FindNetCDF() CMake function from Kitware: https://github.com/Kitware/VTK/blob/master/CMake/FindNetCDF.cmake
It seems very comprehensive.
In netcdf-fortran there is no call to FindNetCDF, but there is a section of code which performs that function:
@WardF I would be interested in your thoughts. We face this same issue in PIO CMake builds...