diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2011-11-03 21:06:37 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2011-11-03 21:06:37 (GMT) |
commit | 49fabfad86090e104a2bf9273f9b93ecd8dd8e22 (patch) | |
tree | 6f033eb795b4812019e9bd0aff39c9fcf05e6140 /fortran/src | |
parent | 677380aa5a1ca7780855935422ee7a5f62682b53 (diff) | |
download | hdf5-49fabfad86090e104a2bf9273f9b93ecd8dd8e22.zip hdf5-49fabfad86090e104a2bf9273f9b93ecd8dd8e22.tar.gz hdf5-49fabfad86090e104a2bf9273f9b93ecd8dd8e22.tar.bz2 |
[svn-r21710] CMake FindMPI module changed to look for fortran libs. Cmake files updated to link with fortran mpi libs.
Updated cacheinit.cmake to set num of procs to 3 for hdf testing.
Tested: local linux and on windows 7
Diffstat (limited to 'fortran/src')
-rw-r--r-- | fortran/src/CMakeLists.txt | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index bc6ab33..ec4d7d1 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -115,7 +115,7 @@ ENDIF (H5_HAVE_PARALLEL) SET_SOURCE_FILES_PROPERTIES (${f90CStub_C_SRCS} PROPERTIES LANGUAGE C) ADD_LIBRARY (${HDF5_F90_C_LIB_TARGET} ${LIB_TYPE} ${f90CStub_C_SRCS}) -TARGET_LINK_LIBRARIES (${HDF5_F90_C_LIB_TARGET} ${HDF5_LIB_TARGET}) +TARGET_LINK_LIBRARIES (${HDF5_F90_C_LIB_TARGET} ${HDF5_LIB_TARGET} ${LINK_LIBS}) SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_C_LIB_TARGET}") H5_SET_LIB_OPTIONS (${HDF5_F90_C_LIB_TARGET} ${HDF5_F90_C_LIB_NAME} ${LIB_TYPE}) SET_TARGET_PROPERTIES (${HDF5_F90_C_LIB_TARGET} PROPERTIES FOLDER libraries/fortran) @@ -180,18 +180,18 @@ SET (f90_F_SRCS #----------------------------------------------------------------------------- # Add H5FDMPIO if parallel #----------------------------------------------------------------------------- -IF (H5_HAVE_PARALLEL) +IF (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) SET (f90_F_SRCS ${f90_F_SRCS} ${HDF5_F90_SRC_SOURCE_DIR}/HDF5mpio.f90 ${HDF5_F90_SRC_SOURCE_DIR}/H5FDmpioff.f90 ) -ELSE (H5_HAVE_PARALLEL) +ELSE (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) SET (f90_F_SRCS ${f90_F_SRCS} ${HDF5_F90_SRC_SOURCE_DIR}/HDF5.f90 ) -ENDIF (H5_HAVE_PARALLEL) +ENDIF (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) #----------------------------------------------------------------------------- # Add Main fortran library @@ -220,6 +220,9 @@ ENDIF (WIN32 AND NOT CYGWIN) TARGET_FORTRAN_WIN_PROPERTIES (${HDF5_F90_LIB_TARGET} ${SHARED_LINK_FLAGS}) SET_TARGET_PROPERTIES (${HDF5_F90_LIB_TARGET} PROPERTIES LINKER_LANGUAGE Fortran) TARGET_LINK_LIBRARIES (${HDF5_F90_LIB_TARGET} ${HDF5_F90_C_LIB_TARGET} ${HDF5_LIB_TARGET}) +IF (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) + TARGET_LINK_LIBRARIES (${HDF5_F90_LIB_TARGET} ${MPI_Fortran_LIBRARIES}) +ENDIF (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_LIB_TARGET}") H5_SET_LIB_OPTIONS (${HDF5_F90_LIB_TARGET} ${HDF5_F90_LIB_NAME} ${LIB_TYPE}) SET_TARGET_PROPERTIES (${HDF5_F90_LIB_TARGET} PROPERTIES FOLDER libraries/fortran) |