Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake: moved logic to enable h5vol to detectoptions.cmake #3701

Merged
merged 1 commit into from
Jul 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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()