2016-04-08 00:42:11 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2024-02-10 17:39:22 +00:00
|
|
|
if (($# != 2)); then
|
|
|
|
echo "usage: $(basename "$0") <prefix> <ntasks>" 1>&2
|
2016-04-08 00:42:11 +01:00
|
|
|
exit 1
|
|
|
|
fi
|
2024-02-10 17:39:22 +00:00
|
|
|
prefix=$1
|
|
|
|
ntasks=$2
|
2016-04-08 00:42:11 +01:00
|
|
|
|
|
|
|
set -ex
|
2024-02-10 17:39:22 +00:00
|
|
|
init_dir=$(pwd -P)
|
|
|
|
mkdir -p "${prefix}"
|
|
|
|
cd "${prefix}"
|
|
|
|
prefix=$(pwd -P)
|
|
|
|
cd "${init_dir}"
|
|
|
|
./install-deps.sh "${prefix}" "${ntasks}"
|
|
|
|
mkdir -p "${init_dir}/local/build/latan"
|
|
|
|
cd "${init_dir}/local/build/latan"
|
|
|
|
cmake -DCMAKE_INSTALL_PREFIX="${prefix}" -DCMAKE_PREFIX_PATH="${prefix}" \
|
|
|
|
-DCMAKE_BUILD_TYPE="RelWithDebInfo" "${init_dir}/.."
|
|
|
|
make -j "${ntasks}"
|
2016-04-08 00:42:11 +01:00
|
|
|
make install
|