summaryrefslogtreecommitdiffstats
path: root/tools/src
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 /tools/src
parent11dfa25910f08e70db336f125d52ef9586416017 (diff)
downloadhdf5-94119211a74ce966380d0013efd48c6effe01f10.zip
hdf5-94119211a74ce966380d0013efd48c6effe01f10.tar.gz
hdf5-94119211a74ce966380d0013efd48c6effe01f10.tar.bz2
Correct the CMake link for MPI (#2198)
Diffstat (limited to 'tools/src')
-rw-r--r--tools/src/h5diff/CMakeLists.txt4
-rw-r--r--tools/src/h5perf/CMakeLists.txt4
2 files changed, 4 insertions, 4 deletions
diff --git a/tools/src/h5diff/CMakeLists.txt b/tools/src/h5diff/CMakeLists.txt
index 8816222..44921cb 100644
--- a/tools/src/h5diff/CMakeLists.txt
+++ b/tools/src/h5diff/CMakeLists.txt
@@ -57,7 +57,7 @@ if (H5_HAVE_PARALLEL)
target_include_directories (ph5diff PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
target_compile_options(ph5diff PRIVATE "${HDF5_CMAKE_C_FLAGS}")
TARGET_C_PROPERTIES (ph5diff STATIC)
- target_link_libraries (ph5diff PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>")
+ target_link_libraries (ph5diff PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:MPI::MPI_C>")
set_target_properties (ph5diff PROPERTIES FOLDER tools)
set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};ph5diff")
set (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES} ph5diff)
@@ -70,7 +70,7 @@ if (H5_HAVE_PARALLEL)
target_include_directories (ph5diff-shared PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
target_compile_options(ph5diff-shared PRIVATE "${HDF5_CMAKE_C_FLAGS}")
TARGET_C_PROPERTIES (ph5diff-shared SHARED)
- target_link_libraries (ph5diff-shared PRIVATE ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>")
+ target_link_libraries (ph5diff-shared PRIVATE ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:MPI::MPI_C>")
set_target_properties (ph5diff-shared PROPERTIES FOLDER tools)
set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};ph5diff-shared")
set (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES} ph5diff-shared)
diff --git a/tools/src/h5perf/CMakeLists.txt b/tools/src/h5perf/CMakeLists.txt
index 7d2a10e..6531ccd 100644
--- a/tools/src/h5perf/CMakeLists.txt
+++ b/tools/src/h5perf/CMakeLists.txt
@@ -38,10 +38,10 @@ if (H5_HAVE_PARALLEL)
target_include_directories (h5perf PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT ONLY_SHARED_LIBS)
TARGET_C_PROPERTIES (h5perf STATIC)
- target_link_libraries (h5perf PRIVATE ${LINK_LIBS} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>")
+ target_link_libraries (h5perf PRIVATE ${LINK_LIBS} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:MPI::MPI_C>")
else ()
TARGET_C_PROPERTIES (h5perf SHARED)
- target_link_libraries (h5perf PRIVATE ${LINK_LIBS} ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>")
+ target_link_libraries (h5perf PRIVATE ${LINK_LIBS} ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:MPI::MPI_C>")
endif ()
set_target_properties (h5perf PROPERTIES FOLDER perform)
set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5perf")