FSL: HDF5 include directory pruned from include path by CMake
I'm building the tip of main branch on a centos7 platform, using cmake 3.27.4 and HDF5 1.14.2.
CMake is pruning the HDF5 directory from the include paths. Some googling suggests it does this because it considers the HDF5 includes to be "dangerous". The only way to get FSL to compile is to create an innocuous sounding directory, copy the HDF5 includes there, and then hack the CMakeLists.txt files that have a target_include_directories for HDF5 to explicitly pull in this new directory.
For example, I have the HDF5 includes in /opt/hdf5/1.14.2/include
and the CMAKE_PREFIX_PATH
include /opt/hdf5/1.14.2
. This directory never shows up in the compilation line, resulting in errors. Even if I explicitly do
include_directories( /opt/hdf5/1.14.2/include )
in say FullSimLight/Plugins/TracksPlugin/CMakeLists.txt it doesn't show up. Trying to trick CMake with /opt/hdf5/1.14.2/include/../include
or ${HDF5_CXX_INCLUDE_DIRS}/../include
also doesn't work. If I do /opt/hdf5/1.14.2/includeX
, it shows up in the compilation line, so it's obviously parsing that line. It really looks like it's actively removing the ${HDF5_CXX_INCLUDE_DIRS}
from the compilation line.