sagecal/build-tests/compile_sagecal.sh

47 lines
855 B
Bash
Raw Normal View History

#!/usr/bin/env bash
echo 'script: ' $0
echo "Building SageCal" && \
echo "Branch --> $BRANCH" && \
echo "Image --> $IMAGE"
cd /travis/workdir && \
mkdir build && cd build
2018-10-02 06:32:35 +08:00
CMAKE_EXE=$(which cmake)
OPTS=''
case $IMAGE in
ubuntu)
OPTS=''
;;
sl7)
2018-10-02 06:32:35 +08:00
CMAKE_EXE=$(which cmake3)
OPTS='-DUSE_FFTW3=ON \
-DCMAKE_INSTALL_PREFIX=/opt/casacore \
-DDATA_DIR=/opt/casacore/data -DUSE_OPENMP=ON \
-DUSE_HDF5=ON \
-DBUILD_PYTHON=ON \
-DUSE_THREADS=ON'
;;
arch)
OPTS=''
;;
*)
echo 'Unknown image $IMAGE!'
exit 1
;;
esac
echo 'CMake options: ' $OPTS
2018-10-02 06:32:35 +08:00
$CMAKE_EXE .. -DCMAKE_INSTALL_PREFIX=/opt/sagecal \
$OPTS
make -j4 && \
make install && \
ls -alsrt /opt/sagecal && \
/opt/sagecal/bin/sagecal