Commit d594322e authored by Frank Freimuth's avatar Frank Freimuth

Update test_HDF5.cmake: Added the loop over various linking options for the

test of parallel hdf5.
parent adbdac84
......@@ -29,6 +29,31 @@ if ( FLEUR_USE_HDF5)
)
endif()
#now try to find the library by adding the -l stuff to the FLEUR_LIBRARIES
foreach(ADD_String "-lhdf5_fortran;-lhdf5"
"-lhdf5_fortran;-lhdf5_f90cstub;-lhdf5"
"-lhdf5_fortran;-lhdf5;-ldl"
"-lhdf5_fortran;-lhdf5_f90cstub;-lhdf5;-ldl"
"-lhdf5_fortran;-lhdf5;-lz"
"-lhdf5_fortran;-lhdf5_f90cstub;-lhdf5;-lz"
"-lhdf5_fortran;-lhdf5;-ldl;-lz"
"-lhdf5_fortran;-lhdf5_f90cstub;-lhdf5;-ldl;-lz")
if (NOT FLEUR_USE_HDF5MPI)
set(TEST_LIBRARIES "${FLEUR_LIBRARIES};${ADD_String}")
try_compile(FLEUR_USE_HDF5MPI ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/cmake/tests/test_HDF5MPI.f90
LINK_LIBRARIES ${TEST_LIBRARIES}
)
if (FLEUR_USE_HDF5MPI)
set(FLEUR_HDF5_LIBRARIES ${TEST_LIBRARIES})
endif()
endif()
endforeach()
message("HDF5 Library found:${FLEUR_USE_HDF5}")
if (DEFINED CLI_FLEUR_USE_HDF5)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment