Add MPI_Fortran variables

This commit is contained in:
Allen Byrne 2017-02-17 12:43:47 -06:00
parent c4a208819d
commit c37ecd5bba
2 changed files with 11 additions and 2 deletions

View File

@ -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
#

View File

@ -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")