diff options
Diffstat (limited to 'fortran/CMakeLists.txt')
-rw-r--r-- | fortran/CMakeLists.txt | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fortran/CMakeLists.txt b/fortran/CMakeLists.txt index 1a6329f..4796187 100644 --- a/fortran/CMakeLists.txt +++ b/fortran/CMakeLists.txt @@ -1,6 +1,10 @@ cmake_minimum_required (VERSION 2.8) PROJECT (HDF5_F90 C CXX Fortran) +IF (H5_HAVE_PARALLEL) + FIND_PACKAGE (MPI) +ENDIF (H5_HAVE_PARALLEL) + #----------------------------------------------------------------------------- # Traverse source subdirectory #----------------------------------------------------------------------------- @@ -18,7 +22,7 @@ ENDIF (HDF5_BUILD_EXAMPLES) #----------------------------------------------------------------------------- IF (BUILD_TESTING) ADD_SUBDIRECTORY (${HDF5_F90_SOURCE_DIR}/test ${HDF5_F90_BINARY_DIR}/test) - IF (H5_HAVE_PARALLEL) + IF (MPI_Fortran_FOUND) ADD_SUBDIRECTORY (${HDF5_F90_SOURCE_DIR}/testpar ${HDF5_F90_BINARY_DIR}/testpar) - ENDIF (H5_HAVE_PARALLEL) + ENDIF (MPI_Fortran_FOUND) ENDIF (BUILD_TESTING) |