With the following CMake command:
eval CC=mpicc CXX= FC=mpif90 cmake \
-DCMAKE_INSTALL_PREFIX=/home/greenc/work/cet-is/test-products/hdf5/v1_10_2_snap10/Linux64bit+3.10-2.17-e17-mpich-prof \
-DHDF5_BUILD_CPP_LIB:BOOL=OFF -DHDF5_BUILD_FORTRAN:BOOL=ON \
-DHDF5_ENABLE_PARLLEL:BOOL=ON -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=ON \
-DCMAKE_CXX_STANDARD=17 -DCMAKE_BUILD_TYPE=RelWithDebInfo \
/home/greenc/work/cet-is/test-products/hdf5/v1_10_2_snap10/source/hdf5-1.10.2-snap10
An attempt to build fails with:
/home/greenc/work/cet-is/test-products/hdf5/v1_10_2_snap10/build/Linux64bit+3.10-2.17-e17-mpich-prof/hl/fortran/src/static/H5LTff_gen.F90:32:6:
USE H5LT_CONST
1
Fatal Error: Can't open module file ‘h5lt_const.mod’ for reading at (1): No such file or directory
compilation terminated.
make[2]: *** [hl/fortran/src/CMakeFiles/hdf5_hl_fortran-static.dir/static/H5LTff_gen.F90.o] Error 1
This appears at first sight to be due to the fact that the HDF5 CMake-based build system puts module files in ${CMAKE_Fortran_MODULE_DIRECTORY}/(static|shared)
, but the default -I
options configured by CMake look only in ${CMAKE_Fortran_MODULE_DIRECTORY}
and not under it.
Is there some quick workaround to get me going here, or am I missing something?