diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2022-11-04 13:13:08 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-04 13:13:08 (GMT) |
commit | 7a1885451213244da0b244338435830fc4dd6ea1 (patch) | |
tree | 49bfaa85dfc0236b43895ed36c7fc284e4f71cf5 /examples | |
parent | 66c8a487221e354d5e8e820176e9a08887caa052 (diff) | |
download | hdf5-7a1885451213244da0b244338435830fc4dd6ea1.zip hdf5-7a1885451213244da0b244338435830fc4dd6ea1.tar.gz hdf5-7a1885451213244da0b244338435830fc4dd6ea1.tar.bz2 |
Merge #2198 correct CMake MPI linking (#2215)
Diffstat (limited to 'examples')
-rw-r--r-- | examples/CMakeLists.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 3f329c1..f453467 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -76,10 +76,10 @@ if (H5_HAVE_PARALLEL) target_include_directories (${parallel_example} PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") if (NOT BUILD_SHARED_LIBS) TARGET_C_PROPERTIES (${parallel_example} STATIC) - target_link_libraries (${parallel_example} PRIVATE ${HDF5_LIB_TARGET} ${MPI_C_LIBRARIES}) + target_link_libraries (${parallel_example} PRIVATE ${HDF5_LIB_TARGET} MPI::MPI_C) else () TARGET_C_PROPERTIES (${parallel_example} SHARED) - target_link_libraries (${parallel_example} PRIVATE ${HDF5_LIBSH_TARGET} ${MPI_C_LIBRARIES}) + target_link_libraries (${parallel_example} PRIVATE ${HDF5_LIBSH_TARGET} MPI::MPI_C) endif () set_target_properties (${parallel_example} PROPERTIES FOLDER examples) |