Skip to content

Commit bb26daa

Browse files
committed
Improve Boost build process
1 parent 9a6b3f9 commit bb26daa

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

tools/ci/installBoost.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ BUILD_LOG=/tmp/boost.log
3636

3737
mkdir -p "${BUILD_DIR}" && cd "${BUILD_DIR}"
3838

39+
echo "Downloading and extracting file..."
3940
FILE_NAME="boost_${VERSION//./_}"
4041
URL="https://sourceforge.net/projects/boost/files/boost/${VERSION}/${FILE_NAME}.tar.bz2/download"
4142
wget "${URL}" -qO- | tar jx
@@ -44,25 +45,30 @@ if [ ! -f "${FILE_NAME}/bootstrap.sh" ]; then
4445
exit 1
4546
fi
4647

48+
echo "Downloaded and extracted file"
4749
cd "${FILE_NAME}"
4850

4951
if [[ "${TRAVIS_OS_NAME:-}" == "windows" ]] || [[ "${RUNNER_OS:-}" == "Windows" ]]; then
52+
NPROC=3
5053
TOOLSET="toolset=msvc"
51-
NPROC=2
54+
VARIANT="debug,release"
5255
else
5356
# Linux and OSX version
5457
NPROC=$(nproc 2>/dev/null || sysctl -n hw.ncpu)
5558
TOOLSET=
59+
VARIANT="release"
5660
fi
5761

5862
libraries=$(join , "${required_libs[@]}")
5963

64+
echo "Bootstrapping B2..."
6065
if ! ./bootstrap.sh --with-libraries="$libraries" threading=multi > "$BUILD_LOG"; then
6166
cat "$BUILD_LOG" || true
6267
cat bootstrap.log
6368
exit 1
6469
fi
65-
if ! ./b2 link="${link}" ${TOOLSET} variant=release --prefix="${INSTALL_DIR}" -j${NPROC} install > "$BUILD_LOG"; then
70+
echo "Building ${libraries}, variants ${VARIANT} to ${INSTALL_DIR} using ${TOOLSET}"
71+
if ! ./b2 link="${link}" ${TOOLSET} variant="${VARIANT}" --prefix="${INSTALL_DIR}" -j${NPROC} install > "$BUILD_LOG"; then
6672
cat "$BUILD_LOG"
6773
exit 1
6874
fi

0 commit comments

Comments
 (0)