mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-11-27 02:10:55 +08:00
Merge pull request #1157 in HDFFV/hdf5 from ~JHENDERSON/hdf5:bugfix/CMake_MPI_libs_fix to develop
* commit 'd075c0854d1ffb5a8eae23c5eb9a4456067f30c9': Add quotes to places where MPI_C_LIBRARIES are linked against
This commit is contained in:
commit
882e59d1b3
@ -858,7 +858,7 @@ target_include_directories(H5detect PRIVATE "${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_
|
||||
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}> $<$<PLATFORM_ID:Windows>:ws2_32.lib>
|
||||
PRIVATE "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>" $<$<PLATFORM_ID:Windows>:ws2_32.lib>
|
||||
INTERFACE $<$<PLATFORM_ID:Emscripten>:"-O0">
|
||||
)
|
||||
|
||||
@ -874,7 +874,7 @@ target_include_directories(H5make_libsettings PRIVATE "${HDF5_BINARY_DIR};$<$<BO
|
||||
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}> $<$<PLATFORM_ID:Windows>:ws2_32.lib>
|
||||
PRIVATE "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>" $<$<PLATFORM_ID:Windows>:ws2_32.lib>
|
||||
INTERFACE $<$<PLATFORM_ID:Emscripten>:"-O0">
|
||||
)
|
||||
|
||||
@ -911,7 +911,7 @@ target_compile_definitions(${HDF5_LIB_TARGET}
|
||||
)
|
||||
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}>
|
||||
PRIVATE ${LINK_LIBS} ${LINK_COMP_LIBS} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>"
|
||||
PUBLIC $<$<NOT:$<PLATFORM_ID:Windows>>:${CMAKE_DL_LIBS}>
|
||||
)
|
||||
set_global_variable (HDF5_LIBRARIES_TO_EXPORT ${HDF5_LIB_TARGET})
|
||||
@ -955,7 +955,7 @@ 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}>
|
||||
PRIVATE ${LINK_LIBS} ${LINK_COMP_LIBS} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>"
|
||||
PUBLIC $<$<NOT:$<PLATFORM_ID:Windows>>:${CMAKE_DL_LIBS}> $<$<BOOL:${HDF5_ENABLE_THREADSAFE}>:Threads::Threads>
|
||||
)
|
||||
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_LIBSH_TARGET}")
|
||||
|
@ -26,7 +26,7 @@ target_include_directories(testphdf5
|
||||
)
|
||||
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_C_LIBRARIES}>"
|
||||
)
|
||||
set_target_properties (testphdf5 PROPERTIES FOLDER test/par)
|
||||
|
||||
@ -37,7 +37,7 @@ MACRO (ADD_H5P_EXE file)
|
||||
)
|
||||
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_C_LIBRARIES}>"
|
||||
)
|
||||
set_target_properties (${file} PROPERTIES FOLDER test/par)
|
||||
ENDMACRO (ADD_H5P_EXE file)
|
||||
|
@ -41,7 +41,7 @@ target_include_directories(${HDF5_TOOLS_LIB_TARGET}
|
||||
TARGET_C_PROPERTIES (${HDF5_TOOLS_LIB_TARGET} STATIC)
|
||||
target_link_libraries (${HDF5_TOOLS_LIB_TARGET}
|
||||
PUBLIC ${HDF5_LIB_TARGET}
|
||||
PRIVATE $<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>
|
||||
PRIVATE "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>"
|
||||
)
|
||||
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_TOOLS_LIB_TARGET}")
|
||||
H5_SET_LIB_OPTIONS (${HDF5_TOOLS_LIB_TARGET} ${HDF5_TOOLS_LIB_NAME} STATIC 0)
|
||||
@ -61,7 +61,7 @@ if (BUILD_SHARED_LIBS)
|
||||
TARGET_C_PROPERTIES (${HDF5_TOOLS_LIBSH_TARGET} SHARED)
|
||||
target_link_libraries (${HDF5_TOOLS_LIBSH_TARGET}
|
||||
PUBLIC ${HDF5_LIBSH_TARGET}
|
||||
PRIVATE $<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>
|
||||
PRIVATE "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>"
|
||||
)
|
||||
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_TOOLS_LIBSH_TARGET}")
|
||||
H5_SET_LIB_OPTIONS (${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_TOOLS_LIB_NAME} SHARED "TOOLS")
|
||||
|
@ -37,7 +37,7 @@ if (H5_HAVE_PARALLEL)
|
||||
)
|
||||
target_include_directories(ph5diff PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
|
||||
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_C_LIBRARIES}>")
|
||||
set_target_properties (ph5diff PROPERTIES FOLDER tools)
|
||||
set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};ph5diff")
|
||||
endif ()
|
||||
|
Loading…
Reference in New Issue
Block a user