summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2022-11-01 21:03:13 (GMT)
committerGitHub <noreply@github.com>2022-11-01 21:03:13 (GMT)
commit94119211a74ce966380d0013efd48c6effe01f10 (patch)
tree04fbf2a6abd345edf64810816cdcabf48d4d801e /examples
parent11dfa25910f08e70db336f125d52ef9586416017 (diff)
downloadhdf5-94119211a74ce966380d0013efd48c6effe01f10.zip
hdf5-94119211a74ce966380d0013efd48c6effe01f10.tar.gz
hdf5-94119211a74ce966380d0013efd48c6effe01f10.tar.bz2
Correct the CMake link for MPI (#2198)
Diffstat (limited to 'examples')
-rw-r--r--examples/CMakeLists.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index efdd59b..10c6ede 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -80,10 +80,10 @@ if (H5_HAVE_PARALLEL)
target_include_directories (${parallel_example} PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${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)