scorpio
scorpio copied to clipboard
cmake/TryNetCDF_DAP.c check outdated
I don't know when the change occurred in ${NetCDF_C_INCLUDE_DIR}/includes/netcdf_meta.h but at least as far back as NetCDF-C v4.5.0, 'NC_HAS_DAP' was replaced by 'NC_HAS_DAP2' and 'NC_HAS_DAP4'. The code in cmake/TryNetCDF_DAP.c causes linking with any semi-recent, DAP enabled version of NetCDF to fail because the search for curl and subsequent addition to the NetCDF_C_Libraries list is omitted. I believe line 8 of cmake/TryNetCDF_DAP.c should read:
#if NC_HAS_DAP==1 || NC_HAS_DAP2==1 || NC_HAS_DAP4==1