netcdf-c
netcdf-c copied to clipboard
PLUGIN_INSTALL_DIR issues
netcdf4-python test failures revealed some issues with the CMake build.
The default value doesn't match the documentation:
# If user wants, then install selected plugins (default on)
SET(PLUGIN_INSTALL_DIR "NO" CACHE STRING "Whether and where we should install plugins; defaults to yes")
It suggest being a boolean (for which YES/ON is equivalent), but treating it as such, by using -DPLUGIN_INSTALL_DIR:BOOL=ON
, causes the build to fail:
Defaulting to -DPLUGIN_INSTALL_DIR=NOTFOUND
The default path (/usr/local/hdf5/lib/plugin
) is also incorrect when using -DCMAKE_INSTALL_PREFIX=/usr
and -DCMAKE_INSTALL_LIBDIR=lib/x86_64-linux-gnu
. A better default would be ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/hdf5/plugin
.
Odd. I must be testing for the exact value "YES" instead of doing a boolean test. I will check.
I hope https://github.com/Unidata/netcdf-c/pull/2430 fixes this.