Skip to content

Commit

Permalink
Explicitly specify ADIOS2 components in openPMDConfig.cmake
Browse files Browse the repository at this point in the history
When including openPMD in downstream CMake and that CMake script
contains Fortran, ADIOS2 will automatically detect that. But since we
do not reexport the ADIOS2 headers, we only need the components that
openPMD explicitly uses: CXX and MPI.
  • Loading branch information
franzpoeschel committed Nov 8, 2024
1 parent 67c95fc commit 9750f26
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion openPMDConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@ set(openPMD_HDF5_FOUND ${openPMD_HAVE_HDF5})

set(openPMD_HAVE_ADIOS2 @openPMD_HAVE_ADIOS2@)
if(openPMD_HAVE_ADIOS2)
find_dependency(ADIOS2)
set(openPMD_REQUIRED_ADIOS2_COMPONENTS CXX)
if(openPMD_HAVE_MPI)
LIST(APPEND openPMD_REQUIRED_ADIOS2_COMPONENTS MPI)
endif()
find_dependency(ADIOS2 COMPONENTS ${openPMD_REQUIRED_ADIOS2_COMPONENTS})
unset(openPMD_REQUIRED_ADIOS2_COMPONENTS)
endif()
set(openPMD_ADIOS2_FOUND ${openPMD_HAVE_ADIOS2})

Expand Down

0 comments on commit 9750f26

Please sign in to comment.