-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall_BOOST.sh
executable file
·50 lines (43 loc) · 1.42 KB
/
install_BOOST.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
#!/bin/bash
source discover_os
discover_os
# check if the directory $1/BOOST exist
if [ -d "$1/BOOST" ]; then
echo "BOOST already installed"
exit 0
fi
rm boost_1_75_0.tar.bz2
wget http://ppmcore.mpi-cbg.de/upload/boost_1_75_0.tar.bz2
tar -xf boost_1_75_0.tar.bz2
cd boost_1_75_0
if [ x"$4" != x"" ]; then
if [ -f $HOME/user-config.jam ]; then
mv $HOME/user-config.jam $HOME/user-config.jam_bck
fi
if [ x"$5" != x"" ]; then
echo "using gcc : $5.$6 : $4 ; " > $HOME/user-config.jam
else
echo "using gcc : : $4 ; " > $HOME/user-config.jam
fi
fi
./bootstrap.sh --with-toolset=$3
mkdir $1/BOOST
# Several flavours
if [ x"$platform" == x"osx" ]; then
if [ x"$arch" == x"arm64" ]; then
if [ x"$3" == x"" ]; then
./b2 -j $2 install --prefix=$1/BOOST address-model=64 architecture=arm abi=aapcs binary-format=mach-o toolset=clang -sNO_LZMA=1 -sNO_ZSTD=1
else
./b2 -j $2 install --prefix=$1/BOOST address-model=64 architecture=arm abi=aapcs binary-format=mach-o toolset=$3 -sNO_LZMA=1 -sNO_ZSTD=1
fi
else
./b2 -j $2 install --prefix=$1/BOOST address-model=64 architecture=x86 abi=sysv binary-format=mach-o toolset=clang -sNO_LZMA=1 -sNO_ZSTD=1
fi
else
./b2 -j $2 install --prefix=$1/BOOST -sNO_LZMA=1 -sNO_ZSTD=1
fi
rm -rf boost_1_75_0
if [ -f $HOME/user-config.jam_bck ]; then
mv $HOME/user-config.jam_bck $HOME/user-config.jam
fi
rm -rf boost_1_75_0.tar.bz2