summaryrefslogtreecommitdiffstats
path: root/fortran/examples
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2011-11-03 21:06:37 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2011-11-03 21:06:37 (GMT)
commit49fabfad86090e104a2bf9273f9b93ecd8dd8e22 (patch)
tree6f033eb795b4812019e9bd0aff39c9fcf05e6140 /fortran/examples
parent677380aa5a1ca7780855935422ee7a5f62682b53 (diff)
downloadhdf5-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/examples')
-rw-r--r--fortran/examples/CMakeLists.txt8
1 files changed, 4 insertions, 4 deletions
diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt
index 609d965..3f3ae9f 100644
--- a/fortran/examples/CMakeLists.txt
+++ b/fortran/examples/CMakeLists.txt
@@ -92,8 +92,7 @@ FOREACH (example ${F2003_examples})
ENDFOREACH (example ${F2003_examples})
ENDIF (FORTRAN_HAVE_ISO_C_BINDING AND HDF5_ENABLE_F2003)
-
-IF (H5_HAVE_PARALLEL)
+IF (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
ADD_EXECUTABLE (f90_ex_ph5example ${HDF5_F90_EXAMPLES_SOURCE_DIR}/ph5example.f90)
TARGET_NAMING (f90_ex_ph5example ${LIB_TYPE})
TARGET_FORTRAN_WIN_PROPERTIES (f90_ex_ph5example "")
@@ -106,12 +105,13 @@ IF (H5_HAVE_PARALLEL)
TARGET_LINK_LIBRARIES (f90_ex_ph5example
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
+ ${MPI_Fortran_LIBRARIES}
)
SET_TARGET_PROPERTIES (f90_ex_ph5example PROPERTIES LINKER_LANGUAGE Fortran)
SET_TARGET_PROPERTIES (f90_ex_ph5example PROPERTIES FOLDER examples/fortran)
IF (BUILD_TESTING)
- ADD_TEST (NAME f90_ex_ph5example COMMAND $<TARGET_FILE:f90_ex_ph5example>)
+ ADD_TEST (NAME f90_ex_ph5example COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:f90_ex_ph5example>)
ENDIF (BUILD_TESTING)
-ENDIF (H5_HAVE_PARALLEL)
+ENDIF (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)