mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-01-18 15:15:56 +08:00
Add MPI_Fortran variables
This commit is contained in:
parent
c4a208819d
commit
c37ecd5bba
@ -877,6 +877,15 @@ if (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/for
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
# Parallel IO usage requires MPI to be Linked and Included
|
||||
if (H5_HAVE_PARALLEL)
|
||||
set (LINK_Fortran_LIBS ${LINK_LIBS} ${MPI_Fortran_LIBRARIES})
|
||||
set (LINK_Fortran_SHARED_LIBS ${LINK_SHARED_LIBS} ${MPI_Fortran_LIBRARIES})
|
||||
if (MPI_Fortran_LINK_FLAGS)
|
||||
set (CMAKE_Fortran_EXE_LINKER_FLAGS "${MPI_Fortran_LINK_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
# wrapper script variables
|
||||
#
|
||||
|
@ -4,7 +4,7 @@ PROJECT (HDF5_FORTRAN_TESTPAR C CXX Fortran)
|
||||
#-----------------------------------------------------------------------------
|
||||
# Setup include Directories
|
||||
#-----------------------------------------------------------------------------
|
||||
INCLUDE_DIRECTORIES (${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src)
|
||||
INCLUDE_DIRECTORIES (${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src ${MPI_Fortran_INCLUDE_PATH})
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Add Tests
|
||||
@ -22,7 +22,7 @@ target_link_libraries (parallel_test
|
||||
${HDF5_F90_TEST_LIB_TARGET}
|
||||
${HDF5_F90_LIB_TARGET}
|
||||
${HDF5_LIB_TARGET}
|
||||
${MPI_Fortran_LIBRARIES}
|
||||
${LINK_Fortran_LIBS}
|
||||
)
|
||||
if (WIN32 AND MSVC)
|
||||
target_link_libraries (parallel_test "ws2_32.lib")
|
||||
|
Loading…
Reference in New Issue
Block a user