Skip to content

Commit

Permalink
Same in CMakeLists.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
franzpoeschel committed Nov 8, 2024
1 parent 9750f26 commit 6132928
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -360,20 +360,24 @@ if(openPMD_HDF5_STATUS)
endif()

# external library: ADIOS2 (optional)
set(openPMD_REQUIRED_ADIOS2_COMPONENTS CXX)
if(openPMD_HAVE_MPI)
list(APPEND openPMD_REQUIRED_ADIOS2_COMPONENTS MPI)
endif()
if(openPMD_USE_ADIOS2 STREQUAL AUTO)
find_package(ADIOS2 2.7.0 CONFIG)
find_package(ADIOS2 2.7.0 CONFIG COMPONENTS ${openPMD_REQUIRED_ADIOS2_COMPONENTS})
if(ADIOS2_FOUND)
set(openPMD_HAVE_ADIOS2 TRUE)
else()
set(openPMD_HAVE_ADIOS2 FALSE)
endif()
elseif(openPMD_USE_ADIOS2)
find_package(ADIOS2 2.7.0 REQUIRED CONFIG)
find_package(ADIOS2 2.7.0 REQUIRED CONFIG COMPONENTS ${openPMD_REQUIRED_ADIOS2_COMPONENTS})
set(openPMD_HAVE_ADIOS2 TRUE)
else()
set(openPMD_HAVE_ADIOS2 FALSE)
endif()
# TODO: Check if ADIOS2 is parallel when openPMD_HAVE_MPI is ON
unset(openPMD_REQUIRED_ADIOS2_COMPONENTS)

# external library: pybind11 (optional)
include(${openPMD_SOURCE_DIR}/cmake/dependencies/pybind11.cmake)
Expand Down

0 comments on commit 6132928

Please sign in to comment.