Commit cc066e10 authored by Daniel Wortmann's avatar Daniel Wortmann

Tried to fix issues with hdf5

parent 74ba8a11
...@@ -62,7 +62,7 @@ if (DEFINED CLI_FLEUR_USE_HDF5) ...@@ -62,7 +62,7 @@ if (DEFINED CLI_FLEUR_USE_HDF5)
add_subdirectory (external/hdf5-git EXCLUDE_FROM_ALL) add_subdirectory (external/hdf5-git EXCLUDE_FROM_ALL)
set(FLEUR_USE_HDF5 TRUE) set(FLEUR_USE_HDF5 TRUE)
set(FLEUR_USE_HDF5MPI FLEUR_USE_MPI) set(FLEUR_USE_HDF5MPI FLEUR_USE_MPI)
set(FLEUR_LIBRARIES "${FLEUR_LIBRARIES};hdf5_fortran-static") set(FLEUR_COMPILE_HDF true)
include_directories("${CMAKE_CURRENT_BINARY_DIR}/modules/hdf5/static") include_directories("${CMAKE_CURRENT_BINARY_DIR}/modules/hdf5/static")
endif() endif()
else() else()
......
...@@ -9,6 +9,9 @@ if(NOT EXISTS "${PROJECT_SOURCE_DIR}/juDFT/CMakeLists.txt" ) ...@@ -9,6 +9,9 @@ if(NOT EXISTS "${PROJECT_SOURCE_DIR}/juDFT/CMakeLists.txt" )
endif() endif()
set(JUDFT_USE_MPI ${FLEUR_USE_MPI} CACHE BOOL "Compile with MPI, will also work in serial") set(JUDFT_USE_MPI ${FLEUR_USE_MPI} CACHE BOOL "Compile with MPI, will also work in serial")
set(JUDFT_USE_HDF5 ${FLEUR_USE_HDF5} CACHE BOOL "Compile with HDF5") set(JUDFT_USE_HDF5 ${FLEUR_USE_HDF5} CACHE BOOL "Compile with HDF5")
if (DEFINED FLEUR_COMPILE_HDF)
set(JUDFT_COMPILE_HDF ON CHACHE BOOL "The HDF5 is compiled as submodule")
endif()
if (DEFINED FLEUR_USE_HDF5MPI) if (DEFINED FLEUR_USE_HDF5MPI)
set(JUDFT_USE_HDF5MPI FLEUR_USE_HDF5MPI CACHE BOOL "Is the HDF5 version able to do parallel IO" ) set(JUDFT_USE_HDF5MPI FLEUR_USE_HDF5MPI CACHE BOOL "Is the HDF5 version able to do parallel IO" )
endif() endif()
......
...@@ -7,6 +7,7 @@ option(JUDFT_USE_HDF5 "Compile HDF5 tools" OFF) ...@@ -7,6 +7,7 @@ option(JUDFT_USE_HDF5 "Compile HDF5 tools" OFF)
option(JUDFT_USE_HDF5MPI "Is the HDF5 version able to do parallel IO" OFF) option(JUDFT_USE_HDF5MPI "Is the HDF5 version able to do parallel IO" OFF)
option(JUDFT_USE_COLLECT "Collect usage data" ON) option(JUDFT_USE_COLLECT "Collect usage data" ON)
option(JUDFT_USE_DEBUG "Set CPP_DEBUG when compiling code" OFF) option(JUDFT_USE_DEBUG "Set CPP_DEBUG when compiling code" OFF)
option(JUDFT_COMPILE_HDF "HDF5 is compiled as submodule" OFF)
#In addition you might want to set #In addition you might want to set
#set(JUDFT_LIBRARIES "-lsomething") #set(JUDFT_LIBRARIES "-lsomething")
#set(JUFDT_COMPILEOPTS "-r8") #set(JUFDT_COMPILEOPTS "-r8")
...@@ -45,7 +46,10 @@ if (JUDFT_USE_MPI) ...@@ -45,7 +46,10 @@ if (JUDFT_USE_MPI)
endif() endif()
if (JUDFT_USE_HDF5) if (JUDFT_USE_HDF5)
target_compile_definitions(juDFT PUBLIC CPP_HDF) target_compile_definitions(juDFT PUBLIC CPP_HDF)
target_link_libraries(juDFT "hdf5_fortran;hdf5") target_link_libraries(juDFT hdf5_fortran hdf5)
if (JUDFT_COMPILE_HDF)
add_dependencies(juDFT hdf5_fortran-static)
endif()
endif() endif()
if (JUDFT_USE_HDF5MPI) if (JUDFT_USE_HDF5MPI)
target_compile_definitions(juDFT PUBLIC CPP_HDFMPI) target_compile_definitions(juDFT PUBLIC CPP_HDFMPI)
......
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