Skip to content

Commit

Permalink
cmake: moved logic to enable h5vol to detectoptions.cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
vicentebolea committed Jul 18, 2023
1 parent 9b279b6 commit cf026d6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ adios_option(SST "Enable support for SST" AUTO)
adios_option(BP5 "Enable support for BP5" AUTO)
adios_option(ZeroMQ "Enable support for ZeroMQ" AUTO)
adios_option(HDF5 "Enable support for the HDF5 engine" AUTO)
adios_option(HDF5_VOL "Enable support for HDF5 ADIOS2 VOL" AUTO)
adios_option(IME "Enable support for DDN IME transport" AUTO)
adios_option(Python "Enable support for Python bindings" AUTO)
adios_option(Fortran "Enable support for Fortran bindings" AUTO)
Expand Down
12 changes: 12 additions & 0 deletions cmake/DetectOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,18 @@ elseif(ADIOS2_USE_HDF5)
message(FATAL_ERROR "MPI is disabled but parallel HDF5 is detected.")
endif()
set(ADIOS2_HAVE_HDF5 TRUE)

# HDF5 VOL requires 1.13+
if(ADIOS2_USE_HDF5_VOL AND ADIOS2_HAVE_HDF5)
if(HDF5_VERSION GREATER_EQUAL 1.14)
set(ADIOS2_HAVE_HDF5_VOL TRUE)
else()
set(ADIOS2_HAVE_HDF5_VOL FALSE)
if(ADIOS2_USE_HDF5_VOL STREQUAL ON)
message(FATAL_ERROR "ADIOS HDF5_VOL requires HDF5>=1.14+")
endif()
endif()
endif()
endif()

# IME
Expand Down
12 changes: 0 additions & 12 deletions source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,6 @@
add_subdirectory(adios2)
add_subdirectory(utils)

# HDF5 VOL requires 1.13+
if(ADIOS2_HAVE_HDF5)
if(HDF5_VERSION VERSION_LESS 1.14)
set(ADIOS2_HAVE_HDF5_VOL OFF CACHE INTERNAL "")
message(STATUS "[ADIOS2 WARNING] To enable ADIOS VOL for HDF5, please use the version 1.14+ ")
else()
set(ADIOS2_HAVE_HDF5_VOL ON CACHE INTERNAL "")
endif()
else()
set(ADIOS2_HAVE_HDF5_VOL OFF CACHE INTERNAL "")
endif()

if(ADIOS2_HAVE_HDF5_VOL)
add_subdirectory(h5vol)
endif()

0 comments on commit cf026d6

Please sign in to comment.