-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathjla_build.sh
executable file
·54 lines (52 loc) · 915 Bytes
/
jla_build.sh
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/bash
export AS_RLIMIT=300000000
root_PWD=$(pwd)
numThreads=2
prefix="../stage"
type="OptDebug"
while true; do
case $1 in
-j)
if [ "x$2" = "x" ]; then
echo "Missing argument for '$1'"
exit 1
fi
numThreads=$2
shift
shift
;;
"--prefix="*)
prefix=${1#--prefix=}
shift
;;
"--type="*)
type=${1#--type=}
shift
;;
"")
break
;;
*)
echo "Unknown option '$1'"
exit 1
esac
done
args="-DCMAKE_BUILD_TYPE=$type"
args+=" -DBUILD_TESTING=on"
args+=" -DBOOST_ROOT=$HOME/programs"
args+=" -DCMAKE_INSTALL_PREFIX=$prefix $@"
./bootstrap.sh \
&& rm -rf build && mkdir build \
&& cd build && cmake ../ $args
res=$?
if [ $res -ne 0 ]; then
echo "Error during configuration"
exit $res
fi
time make -j $numThreads \
&& make install
res=$?
if [ $res -ne 0 ]; then
echo "Error during installation"
exit $res
fi