Files
MX_Pmodule/MPI/dks/build

42 lines
841 B
Plaintext
Executable File

#!/usr/bin/env modbuild
# :FIXME: script does not work any more!
pbuild::set_download_url "http://amas.web.psi.ch/Downloads/$P/src/$P-${V_PKG}.tar.gz"
pbuild::add_to_group 'MPI'
declare -ra vers=( ${V//./ } )
conf=()
if (( ${vers[0]} >= 1 && ${vers[1]} >= 1 )); then
conf+=("-DDKS_FULL=ON")
fi
if (( ${vers[0]} >= 1 && ${vers[1]} >= 1 && ${vers[2]} >= 2 )); then
# if we want to link OPAL with static cuda libraries, we
# cannot use DKS_FULL=ON. This must be fixed in DKS.
conf=()
conf+=("-DENABLE_OPAL=ON")
conf+=("-DSTATIC_CUDA=1")
fi
pbuild::configure() {
export CXX=mpicxx
export CC=mpicc
cmake \
-DCMAKE_INSTALL_PREFIX="${PREFIX}" \
"${conf[@]}" \
"${SRC_DIR}" \
|| exit 1
}
pbuild::install() {
install -d "${PREFIX}/lib"
make install
}
# Local Variables:
# mode: sh
# sh-basic-offset: 8
# tab-width: 8
# End: