Copy of osx-environment at 9993042d6
[windows-environment.git] / Scripts / boost.sh
1 #!/bin/bash -e
2
3 tar xjf $CBS_ARCHIVES/boost_1_74_0.tar.bz2
4 cd boost_1_74_0
5 patch -p1 < $CBS_PATCHES/boost-macos-warning.patch
6 pushd tools/build
7 patch -p1 < $CBS_PATCHES/boost-arm64.patch
8 popd
9
10 ./bootstrap.sh --without-icu --without-libraries=context,python,mpi,fiber,coroutine,container
11
12 if [ "$CBS_CLANG_ARCH" == "x86_64" ]; then
13   short_arch=x86
14   long_arch=x86_64
15 else
16   short_arch=arm
17   long_arch=arm64
18 fi
19
20 cat <<EOF > user-config.jam
21 using darwin :
22 : clang++ 
23 : <address-model>$short_arch
24   <architecture>$long_arch
25   <toolset>clang
26 ;
27 EOF
28
29 ./b2 --prefix=$CBS_ROOT $CBS_PARALLEL --user-config=user-config.jam install threading=multi \
30   cxxflags="-std=c++14 -stdlib=libc++ $CBS_OSX_FLAGS" \
31   linkflags="-stdlib=libc++ $CBS_OSX_FLAGS"