#!/usr/bin/env modbuild

P='OPAL'

module use unstable

# add -fopenmp to CC and CXX, if you want to compile with OpenMP
pbuild::configure() {
	cmake \
		-DCMAKE_INSTALL_PREFIX="${PREFIX}" \
		-DCMAKE_BUILD_TYPE=RELEASE \
		-DENABLE_SAAMG_SOLVER=TRUE \
		"${MODULE_SRCDIR}"
}

pbuild::add_to_group 'MPI'
pbuild::set_runtime_dependencies "${COMPILER}" "${MPI}"
pbuild::set_build_dependencies 'cmake' "${COMPILER}" "${MPI}" 'boost' 'hdf5' 'H5hut' 'trilinos' 'gsl'
pbuild::set_supported_compilers 'gcc/4.7' 'gcc/4.8'
pbuild::make_all

