Skip to content

Commit 518526d

Browse files
committed
findHDF5: add distro-specific lib names
1 parent 573e133 commit 518526d

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

cmake/Modules/FindHDF5.cmake

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,17 @@ set(_names hdf5_fortran)
232232
set(_hl_names hdf5_hl_fortran hdf5hl_fortran)
233233
set(_hl_stub_names hdf5_hl_f90cstub)
234234
set(_stub_names hdf5_f90cstub)
235+
236+
# distro names (Ubuntu)
237+
if(parallel IN_LIST HDF5_FIND_COMPONENTS)
238+
list(APPEND _names hdf5_openmpi_fortran hdf5_mpich_fortran)
239+
list(APPEND _hl_names hdf5_openmpihl_fortran hdf5_mpichhl_fortran)
240+
else()
241+
list(APPEND _names hdf5_serial_fortran)
242+
list(APPEND _hl_names hdf5_serialhl_fortran)
243+
endif()
244+
245+
# Debug names
235246
if(MSVC)
236247
list(APPEND _names hdf5_fortran_D)
237248
list(APPEND _hl_names hdf5_hl_fortran_D)
@@ -357,6 +368,17 @@ endif()
357368

358369
set(_names hdf5_cpp)
359370
set(_hl_names hdf5_hl_cpp)
371+
372+
# distro names (Ubuntu)
373+
if(parallel IN_LIST HDF5_FIND_COMPONENTS)
374+
list(APPEND _names hdf5_openmpi_cpp hdf5_mpich_cpp)
375+
list(APPEND _hl_names hdf5_openmpi_hl_cpp hdf5_mpich_hl_cpp)
376+
else()
377+
list(APPEND _names hdf5_serial_cpp)
378+
list(APPEND _hl_names hdf5_serial_hl_cpp)
379+
endif()
380+
381+
# Debug names
360382
if(MSVC)
361383
list(APPEND _names hdf5_cpp_D)
362384
list(APPEND _hl_names hdf5_hl_cpp_D)
@@ -408,6 +430,15 @@ endif()
408430
set(_names hdf5)
409431
set(_hl_names hdf5_hl)
410432

433+
# distro names (Ubuntu)
434+
if(parallel IN_LIST HDF5_FIND_COMPONENTS)
435+
list(APPEND _names hdf5_openmpi hdf5_mpich)
436+
list(APPEND _hl_names hdf5_openmpi_hl hdf5_mpich_hl)
437+
else()
438+
list(APPEND _names hdf5_serial)
439+
list(APPEND _hl_names hdf5_serial_hl)
440+
endif()
441+
411442
# debug names
412443
if(MSVC)
413444
list(APPEND _names hdf5_D)

0 commit comments

Comments
 (0)