diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2022-11-05 19:47:25 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-05 19:47:25 (GMT) |
commit | 065a466bc80b0b947eddd2f9c634e0f191c81025 (patch) | |
tree | c61ee8c55729a11b9be894de3f4952f627a9157c /src/CMakeLists.txt | |
parent | e1673be0efa4a4549727bc03db4b719f4e280ad6 (diff) | |
download | hdf5-065a466bc80b0b947eddd2f9c634e0f191c81025.zip hdf5-065a466bc80b0b947eddd2f9c634e0f191c81025.tar.gz hdf5-065a466bc80b0b947eddd2f9c634e0f191c81025.tar.bz2 |
Merge #2198 CMake MPI link (#2216)
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 217a96d..faa7964 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -977,7 +977,7 @@ target_include_directories (H5detect PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_ target_compile_definitions(H5detect PUBLIC ${HDF_EXTRA_C_FLAGS} ${HDF_EXTRA_FLAGS}) TARGET_C_PROPERTIES (H5detect STATIC) target_link_libraries (H5detect - PRIVATE "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>" $<$<OR:$<PLATFORM_ID:Windows>,$<PLATFORM_ID:MinGW>>:ws2_32.lib> + PRIVATE "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:MPI::MPI_C>" $<$<OR:$<PLATFORM_ID:Windows>,$<PLATFORM_ID:MinGW>>:ws2_32.lib> ) target_compile_options(H5detect PRIVATE "$<$<PLATFORM_ID:Emscripten>:-O0>" @@ -1071,7 +1071,7 @@ target_include_directories (H5make_libsettings PRIVATE "${HDF5_SRC_DIR};${HDF5_S target_compile_definitions(H5make_libsettings PUBLIC ${HDF_EXTRA_C_FLAGS} ${HDF_EXTRA_FLAGS}) TARGET_C_PROPERTIES (H5make_libsettings STATIC) target_link_libraries (H5make_libsettings - PRIVATE "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>" $<$<OR:$<PLATFORM_ID:Windows>,$<PLATFORM_ID:MinGW>>:ws2_32.lib> + PRIVATE "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:MPI::MPI_C>" $<$<OR:$<PLATFORM_ID:Windows>,$<PLATFORM_ID:MinGW>>:ws2_32.lib> ) target_compile_options(H5make_libsettings PRIVATE "$<$<PLATFORM_ID:Emscripten>:-O0>" @@ -1142,8 +1142,8 @@ if (NOT ONLY_SHARED_LIBS) ) TARGET_C_PROPERTIES (${HDF5_LIB_TARGET} STATIC) target_link_libraries (${HDF5_LIB_TARGET} - PRIVATE ${LINK_LIBS} ${LINK_COMP_LIBS} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>" - PUBLIC $<$<NOT:$<PLATFORM_ID:Windows>>:${CMAKE_DL_LIBS}> + PRIVATE ${LINK_LIBS} ${LINK_COMP_LIBS} + PUBLIC $<$<NOT:$<PLATFORM_ID:Windows>>:${CMAKE_DL_LIBS}> "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:MPI::MPI_C>" ) if (NOT WIN32) target_link_libraries (${HDF5_LIB_TARGET} @@ -1184,8 +1184,8 @@ if (BUILD_SHARED_LIBS) ) TARGET_C_PROPERTIES (${HDF5_LIBSH_TARGET} SHARED) target_link_libraries (${HDF5_LIBSH_TARGET} - PRIVATE ${LINK_LIBS} ${LINK_COMP_LIBS} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>" $<$<BOOL:${HDF5_ENABLE_THREADSAFE}>:Threads::Threads> - PUBLIC $<$<NOT:$<PLATFORM_ID:Windows>>:${CMAKE_DL_LIBS}> + PRIVATE ${LINK_LIBS} ${LINK_COMP_LIBS} $<$<BOOL:${HDF5_ENABLE_THREADSAFE}>:Threads::Threads> + PUBLIC $<$<NOT:$<PLATFORM_ID:Windows>>:${CMAKE_DL_LIBS}> "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:MPI::MPI_C>" ) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_LIBSH_TARGET}") H5_SET_LIB_OPTIONS (${HDF5_LIBSH_TARGET} ${HDF5_LIB_NAME} SHARED "LIB") |