#!/usr/bin/env modbuild

config_args=()

case ${OS} in
Darwin )
	:
	;;
Linux )
	config_args+=( '-DENABLE_DKS=ON' )
	;;
esac

# 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 \
		"${config_args[@]}" \
		"${MODULE_SRCDIR}"
}

pbuild::add_to_group 'MPI'
pbuild::set_supported_compilers 'gcc/4.7' 'gcc/4.8' 'gcc/4.9' 'gcc/5.4'
pbuild::make_all

