forked from jdswinbank/tkp-lofar-build
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild_casarest
More file actions
37 lines (30 loc) · 1.13 KB
/
build_casarest
File metadata and controls
37 lines (30 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
####################################################################
startdir=`pwd`
BUILD_SCRIPTS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)"
source $BUILD_SCRIPTS_DIR/CONFIG
source $BUILD_SCRIPTS_DIR/utils.sh
####################################################################
echo "*** Building casarest... ***"
cd $CASAREST_SVNROOT
SVN_REV=$(get_git_svnrev)
GIT_HASH=$(get_git_short_hash)
CASAREST_REV="${SVN_REV}_${GIT_HASH}"
BUILD_TARGET=$STABLE_SOFT_DIR/builds/casarest/casarest_r${CASAREST_REV}
echo "Installing into $BUILD_TARGET"
mkdir -p $BUILD_TARGET
ln -sfnv $BUILD_TARGET $STABLE_SOFT_DIR/builds/casarest/casarest-latest
#CASAREST_TARGET=$TARGET/casarest_release-1.1.1
rm -rf build/
mkdir build
cd build
cmake_command="cmake $CASAREST_SVNROOT/trunk/casarest -DCMAKE_INSTALL_PREFIX=$BUILD_TARGET \
-DCASACORE_ROOT_DIR=$(readlink ${STABLE_SOFT_DIR}/builds/casacore/casacore-latest ) \
-DBUILD_ALL=1"
# -DWCSLIB_ROOT_DIR=$WCSLIB_ROOT_DIR \
echo $cmake_command > cmake_command.sh
bash cmake_command.sh
make -j$LOFAR_BUILD_NJOBS
check_result "casarest" "make" $?
make install
check_result "casarest" "make install" $?