Files
MX_Pmodule/EM/relion/build

43 lines
1.1 KiB
Plaintext
Executable File

#!/usr/bin/env modbuild
pbuild::add_to_group 'EM'
pbuild::use_cmake
pbuild::prep() {
local BRANCH
if [[ "$V" =~ beta$ ]]; then
BRANCH="ver${V_MAJOR}.${V_MINOR}"
else
BRANCH="${V_PKG}"
fi
git clone --depth=1 -b "$BRANCH" https://github.com/3dem/relion.git "$SRC_DIR" || return $?
}
pbuild::pre_configure() {
# CMake-based build
pbuild::add_configure_args "-DFORCE_OWN_FFTW=ON"
pbuild::add_configure_args "-DFORCE_OWN_FLTK=ON"
pbuild::add_configure_args "-DFORCE_OWN_TBB=ON"
# CUDA related (set lowest CC to 6.1 for 1080 compatibility)
pbuild::add_configure_args "-DCUDA=ON"
pbuild::add_configure_args "-DCUDA_ARCH=61"
pbuild::add_configure_args "-DCudaTexture=ON"
# Since ver3.0 relion cannot have ALTCPU and CUDA activated
# at the same time. Otherwise the configuration exits with
# an error.
if [[ "$V_MAJOR" -le "3" ]]; then
pbuild::add_configure_args "-DALTCPU=ON"
fi
if [[ -n "$INTEL_VERSION" ]]; then
# Requires intel compiler
pbuild::add_configure_args "-DMKLFFT=ON"
fi
}
# vim: ts=4 sw=4 et