2015-02-19 00:56:22 +08:00
|
|
|
cmake_minimum_required (VERSION 3.1.0)
|
2010-05-14 00:01:50 +08:00
|
|
|
PROJECT (HDF5_F90 C CXX Fortran)
|
|
|
|
|
2014-03-12 05:14:57 +08:00
|
|
|
if (H5_HAVE_PARALLEL)
|
2014-03-26 05:57:30 +08:00
|
|
|
INCLUDE (FindMPI)
|
|
|
|
set (LINK_LIBS ${LINK_LIBS} ${MPI_Fortran_LIBRARIES})
|
|
|
|
if (MPI_Fortran_LINK_FLAGS)
|
|
|
|
set (CMAKE_EXE_LINKER_FLAGS "${MPI_Fortran_LINK_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}")
|
|
|
|
endif (MPI_Fortran_LINK_FLAGS)
|
2014-03-12 05:14:57 +08:00
|
|
|
endif (H5_HAVE_PARALLEL)
|
2011-11-04 05:06:37 +08:00
|
|
|
|
2010-05-14 00:01:50 +08:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Traverse source subdirectory
|
|
|
|
#-----------------------------------------------------------------------------
|
2014-03-19 00:21:46 +08:00
|
|
|
add_subdirectory (${HDF5_F90_SOURCE_DIR}/src ${HDF5_F90_BINARY_DIR}/src)
|
2010-05-14 00:01:50 +08:00
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Build the Fortran Examples
|
|
|
|
#-----------------------------------------------------------------------------
|
2014-03-12 05:14:57 +08:00
|
|
|
if (HDF5_BUILD_EXAMPLES)
|
2014-03-19 00:21:46 +08:00
|
|
|
add_subdirectory (${HDF5_F90_SOURCE_DIR}/examples ${HDF5_F90_BINARY_DIR}/examples)
|
2014-03-12 05:14:57 +08:00
|
|
|
endif (HDF5_BUILD_EXAMPLES)
|
2010-05-14 00:01:50 +08:00
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Testing
|
|
|
|
#-----------------------------------------------------------------------------
|
2014-03-12 05:14:57 +08:00
|
|
|
if (BUILD_TESTING)
|
2014-03-19 00:21:46 +08:00
|
|
|
add_subdirectory (${HDF5_F90_SOURCE_DIR}/test ${HDF5_F90_BINARY_DIR}/test)
|
2014-03-12 05:14:57 +08:00
|
|
|
if (MPI_Fortran_FOUND)
|
2014-03-19 00:21:46 +08:00
|
|
|
add_subdirectory (${HDF5_F90_SOURCE_DIR}/testpar ${HDF5_F90_BINARY_DIR}/testpar)
|
2014-03-12 05:14:57 +08:00
|
|
|
endif (MPI_Fortran_FOUND)
|
|
|
|
endif (BUILD_TESTING)
|