summaryrefslogtreecommitdiffstats
path: root/testpar/CMakeLists.txt
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2022-11-04 13:13:08 (GMT)
committerGitHub <noreply@github.com>2022-11-04 13:13:08 (GMT)
commit7a1885451213244da0b244338435830fc4dd6ea1 (patch)
tree49bfaa85dfc0236b43895ed36c7fc284e4f71cf5 /testpar/CMakeLists.txt
parent66c8a487221e354d5e8e820176e9a08887caa052 (diff)
downloadhdf5-7a1885451213244da0b244338435830fc4dd6ea1.zip
hdf5-7a1885451213244da0b244338435830fc4dd6ea1.tar.gz
hdf5-7a1885451213244da0b244338435830fc4dd6ea1.tar.bz2
Merge #2198 correct CMake MPI linking (#2215)
Diffstat (limited to 'testpar/CMakeLists.txt')
-rw-r--r--testpar/CMakeLists.txt8
1 files changed, 4 insertions, 4 deletions
diff --git a/testpar/CMakeLists.txt b/testpar/CMakeLists.txt
index ff4446c..4d9e65b 100644
--- a/testpar/CMakeLists.txt
+++ b/testpar/CMakeLists.txt
@@ -29,12 +29,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)
@@ -55,13 +55,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 ()