summaryrefslogtreecommitdiffstats
path: root/testpar
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 /testpar
parent11dfa25910f08e70db336f125d52ef9586416017 (diff)
downloadhdf5-94119211a74ce966380d0013efd48c6effe01f10.zip
hdf5-94119211a74ce966380d0013efd48c6effe01f10.tar.gz
hdf5-94119211a74ce966380d0013efd48c6effe01f10.tar.bz2
Correct the CMake link for MPI (#2198)
Diffstat (limited to 'testpar')
-rw-r--r--testpar/CMakeLists.txt8
1 files changed, 4 insertions, 4 deletions
diff --git a/testpar/CMakeLists.txt b/testpar/CMakeLists.txt
index c9e0cc9..c950b1b 100644
--- a/testpar/CMakeLists.txt
+++ b/testpar/CMakeLists.txt
@@ -34,12 +34,12 @@ target_include_directories (testphdf5
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (testphdf5 STATIC)
target_link_libraries (testphdf5
- PRIVATE ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>"
+ PRIVATE ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:MPI::MPI_C>"
)
else ()
TARGET_C_PROPERTIES (testphdf5 SHARED)
target_link_libraries (testphdf5
- PRIVATE ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>"
+ PRIVATE ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:MPI::MPI_C>"
)
endif ()
set_target_properties (testphdf5 PROPERTIES FOLDER test/par)
@@ -64,13 +64,13 @@ macro (ADD_H5P_EXE file)
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (${file} STATIC)
target_link_libraries (${file}
- PRIVATE ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>"
+ PRIVATE ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:MPI::MPI_C>"
$<$<OR:$<PLATFORM_ID:Windows>,$<PLATFORM_ID:MinGW>>:ws2_32.lib>
)
else ()
TARGET_C_PROPERTIES (${file} SHARED)
target_link_libraries (${file}
- PRIVATE ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>"
+ PRIVATE ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:MPI::MPI_C>"
$<$<OR:$<PLATFORM_ID:Windows>,$<PLATFORM_ID:MinGW>>:ws2_32.lib>
)
endif ()