Thank you so much for your reply. Appreciated. Sorry to take your valuable time. I am not sure how, but it has always been the case that the library is found. This is what my CMakeCache.txt shows, i.e.,
NETCDF_LIBRARY:FILEPATH=/opt/apps/resif/data/production/v1.2-20191021/default/software/data/netCDF/4.6.2-gompi-2019a/lib64/libnetcdf.so
The command below shows no output:
nm -gu /opt/apps/resif/data/production/v1.2-20191021/default/software/data/netCDF/4.6.2-gompi-2019a/lib64/libnetcdf.so | grep nc_def_var_deflate
I did insert these commands below in /cmake/modules/ FindNETCDF.cmake
set (NETCDF_DIR /opt/apps/resif/data/production/v1.2-20191021/default/software/data/netCDF/4.6.2-gompi-2019a)
set (NETCDF_LIBRARY /opt/apps/resif/data/production/v1.2-20191021/default/software/data/netCDF/4.6.2-gompi-2019a/lib64/libnetcdf.so)
set (export NETCDF_ROOT=/opt/apps/resif/data/production/v1.2-20191021/default/software/data/netCDF/4.6.2-gompi-2019a)
I also insert the same environment specifications at ConfigUser.cmake
So the same error happens all the times.