#!/usr/bin/env modbuild

pbuild::configure() {
	CC=$MPICC
	CXX=$MPICXX
	F77=$MPIF77
	F90=$MPIF90
	FC=$MPIFC
	FORTRAN=$MPIFORTRAN

	rm -f CMakeCache.txt
	cmake \
		-DCMAKE_BUILD_TYPE=RELEASE \
		-DCMAKE_INSTALL_PREFIX="${PREFIX}" \
		"${SRC_DIR}" \
		|| exit 1 
}

pbuild::add_to_group 'MPI'
pbuild::set_runtime_dependencies "${COMPILER}" "${MPI}"
pbuild::set_build_dependencies 'cmake' "${COMPILER}" "${MPI}"
pbuild::install_docfiles LICENSE README
pbuild::make_all

