-
Notifications
You must be signed in to change notification settings - Fork 165
/
Copy pathget-boost.sh
executable file
·106 lines (96 loc) · 2.62 KB
/
get-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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
#!/bin/sh
# Downloads Boost superproject from given Git branch
# with all submodules required by Boost.GIL.
set -e
echo "get-boost: Downloading Boost superproject from Git"
BOOST_BRANCH="master"
if [ "$1" != "master" ]; then
BOOST_BRANCH="develop"
fi
BUILD_DIR=$2
echo "BOOST_BRANCH=$BOOST_BRANCH"
echo "BUILD_DIR=$BUILD_DIR"
# Some (e.g. CircleCI) may have ancient version of Git installed.
GIT_VERSION_MAJOR=$(git version | sed 's/git version //g' | cut -d. -f1)
GIT_VERSION_MINOR=$(git version | sed 's/git version //g' | cut -d. -f2)
if test $GIT_VERSION_MAJOR -gt 2 || test $GIT_VERSION_MAJOR -eq 2 -a $GIT_VERSION_MINOR -gt 8; then
GIT_SUBMODULE_OPTS="--jobs 4"
fi
# Use a reasonably large depth to prevent intermittent update failures due to
# commits being on a submodule's master before the superproject is updated.
git clone -b $BOOST_BRANCH --depth 10 https://github.com/boostorg/boost.git boost-root
cd boost-root
# List all (recursive) dependencies explicitly to control any new additions
# Direct (of GIL headers only)
git submodule --quiet update --init $GIT_SUBMODULE_OPTS \
tools/build \
tools/boost_install \
tools/boostdep \
libs/headers \
libs/algorithm \
libs/array \
libs/assert \
libs/concept_check \
libs/config \
libs/core \
libs/crc \
libs/filesystem \
libs/integer \
libs/iterator \
libs/mp11 \
libs/mpl \
libs/preprocessor \
libs/type_traits \
libs/variant2
# Transitive (of GIL tests too)
git submodule --quiet update --init $GIT_SUBMODULE_OPTS \
libs/align \
libs/atomic \
libs/bind \
libs/chrono \
libs/container \
libs/container_hash \
libs/conversion \
libs/detail \
libs/exception \
libs/function \
libs/function_types \
libs/fusion \
libs/intrusive \
libs/io \
libs/lambda \
libs/math \
libs/move \
libs/optional \
libs/predef \
libs/range \
libs/ratio \
libs/rational \
libs/regex \
libs/static_assert \
libs/smart_ptr \
libs/system \
libs/throw_exception \
libs/timer \
libs/tuple \
libs/type_index \
libs/typeof \
libs/unordered \
libs/utility \
libs/winapi
if [ -d ./.git ]; then
echo "get-boost: git log --stat -1"
git --no-pager log --stat -1
fi
echo "get-boost: Deleting $PWD/libs/gil cloned with Boost superproject"
rm -rf libs/gil
echo "get-boost: Copying $BUILD_DIR to $PWD/libs/gil"
cp -r $BUILD_DIR libs/gil
if [ -d libs/gil/.git ]; then
current_pwd=`pwd`
cd libs/gil
echo "get-boost: git log --stat -1"
git --no-pager log --stat -1
cd $current_pwd
fi
echo "get-boost: Done"