Commit e9cd8a90 authored by Nebil Ayape Katcho's avatar Nebil Ayape Katcho

CFML_HDF5 for the old version of CrysFML.

In set_compiler_flags I have commented the command
set(CMAKE_Fortran_FLAGS ""). In this way, the compilation
follows the default flags of cmake. Some of these flags are
/libs:dll /threads. This means that a dynamic runtime library
is used. In this way we avoid conflicts when compiling external
programs that make use of CFML_HDF5. If it is preferred to keep
this command, then, when compiling an external program that makes
use of CFML_HDF5, the following flags are required for linking:
 /link /nodefaultlib:library, where library is the library
that enters in conflict.
parent 046d3cc1
Pipeline #7299 passed with stages
in 8 minutes and 37 seconds
This diff is collapsed.
# Find hdf5 libraries
find_library(hdf5_fortran NAME libhdf5_fortran PATHS ${HDF5_LIBRARY_PATH})
if(hdf5_fortran STREQUAL hdf5_fortran-NOTFOUND)
message(FATAL_ERROR "libhdf5_fortran not found")
endif()
find_library(hdf5_f90cstub NAME libhdf5_f90cstub PATHS ${HDF5_LIBRARY_PATH})
if(hdf5_f90cstub STREQUAL hdf5_f90cstub-NOTFOUND)
message(FATAL_ERROR "libhdf5_f90cstub not found")
endif()
find_library(hdf5 NAME libhdf5 PATHS ${HDF5_LIBRARY_PATH})
if(hdf5 STREQUAL hdf5-NOTFOUND)
message(FATAL_ERROR "libhdf5 not found")
endif()
find_library(szip NAME libszip PATHS ${HDF5_LIBRARY_PATH})
if(szip STREQUAL szip-NOTFOUND)
message(FATAL_ERROR "libszip not found")
endif()
find_library(zlib NAME libzlib PATHS ${HDF5_LIBRARY_PATH})
if(zlib STREQUAL zlib-NOTFOUND)
message(FATAL_ERROR "libzlib not found")
endif()
set(HDF5_LIBS libhdf5_fortran libhdf5_f90cstub libhdf5 libszip libzlib)
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