Upgrade to boost 1.58

This commit is contained in:
Sebastian Messmer 2018-12-25 07:54:15 +01:00
parent a8476a2699
commit d44cb9b4e2
3 changed files with 11 additions and 11 deletions

View File

@ -90,12 +90,12 @@ references:
restore_cache: restore_cache:
keys: keys:
# Find the most recent cache from any branch # Find the most recent cache from any branch
- v3_upgrade_boost_cache_{{ checksum "/tmp/_build_env_vars" }}_{{ arch }} - v4_upgrade_boost_cache_{{ checksum "/tmp/_build_env_vars" }}_{{ arch }}
upgrade_boost_post: &upgrade_boost_post upgrade_boost_post: &upgrade_boost_post
save_cache: save_cache:
key: v3_upgrade_boost_cache_{{ checksum "/tmp/_build_env_vars" }}_{{ arch }} key: v4_upgrade_boost_cache_{{ checksum "/tmp/_build_env_vars" }}_{{ arch }}
paths: paths:
- /tmp/boost_1_57_0 - /tmp/boost_1_58_0
upgrade_boost: &upgrade_boost upgrade_boost: &upgrade_boost
run: run:
name: Upgrade Boost name: Upgrade Boost
@ -104,10 +104,10 @@ references:
export NUMCORES=`nproc` export NUMCORES=`nproc`
echo Using $NUMCORES cores echo Using $NUMCORES cores
# Download and prepare boost (only if not already present from cache) # Download and prepare boost (only if not already present from cache)
if [ ! -d "/tmp/boost_1_57_0" ]; then if [ ! -d "/tmp/boost_1_58_0" ]; then
echo "Didn't find boost in cache. Downloading and building." echo "Didn't find boost in cache. Downloading and building."
wget -O /tmp/boost.tar.bz2 https://sourceforge.net/projects/boost/files/boost/1.57.0/boost_1_57_0.tar.bz2/download wget -O /tmp/boost.tar.bz2 https://sourceforge.net/projects/boost/files/boost/1.58.0/boost_1_58_0.tar.bz2/download
if [ $(sha512sum /tmp/boost.tar.bz2 | awk '{print $1;}') == "61881440fd89644c43c6e3bc6292e9fed75a6d3a76f98654b189d0ed4e1087d77b585884e882270c08bf9f7132b173bfc1fde05848e06aa78ba7f1008d10714d" ]; then if [ $(sha512sum /tmp/boost.tar.bz2 | awk '{print $1;}') == "7480ec713b0aa13f0ec990603e87e3b5c8d53f4411329b10fae37fc963b90aad12dbd9290a33c3669ae801e9012a68683eadff057591e9ca2ebcd22b1a67b5d1" ]; then
echo Correct sha512sum echo Correct sha512sum
else else
echo Wrong sha512sum echo Wrong sha512sum
@ -117,14 +117,14 @@ references:
echo Extracting... echo Extracting...
tar -xf /tmp/boost.tar.bz2 -C /tmp tar -xf /tmp/boost.tar.bz2 -C /tmp
rm -rf boost.tar.bz2 rm -rf boost.tar.bz2
cd /tmp/boost_1_57_0 cd /tmp/boost_1_58_0
./bootstrap.sh --with-toolset=${BUILD_TOOLSET} --with-libraries=filesystem,thread,chrono,program_options ./bootstrap.sh --with-toolset=${BUILD_TOOLSET} --with-libraries=filesystem,thread,chrono,program_options
cd .. cd ..
else else
echo Found boost in cache. Use cache and build. echo Found boost in cache. Use cache and build.
fi fi
# Compile and install boost (if cached, this should be fast) # Compile and install boost (if cached, this should be fast)
cd /tmp/boost_1_57_0 cd /tmp/boost_1_58_0
sudo ./b2 toolset=${BUILD_TOOLSET} link=static cxxflags=-fPIC -d0 -j$NUMCORES install sudo ./b2 toolset=${BUILD_TOOLSET} link=static cxxflags=-fPIC -d0 -j$NUMCORES install
build_pre: &build_pre build_pre: &build_pre
restore_cache: restore_cache:

View File

@ -26,7 +26,7 @@ Requirements
- GCC version >= 5.0 or Clang >= 4.0 - GCC version >= 5.0 or Clang >= 4.0
- CMake version >= 3.0 - CMake version >= 3.0
- libcurl4 (including development headers) - libcurl4 (including development headers)
- Boost libraries version >= 1.57 (including development headers) - Boost libraries version >= 1.58 (including development headers)
- filesystem - filesystem
- system - system
- chrono - chrono

View File

@ -108,7 +108,7 @@ endfunction(target_enable_style_warnings)
function(target_add_boost TARGET) function(target_add_boost TARGET)
# Load boost libraries # Load boost libraries
if(NOT DEFINED Boost_USE_STATIC_LIBS OR Boost_USE_STATIC_LIBS) if(NOT DEFINED Boost_USE_STATIC_LIBS OR Boost_USE_STATIC_LIBS)
# Many supported systems don't have boost >= 1.57. Better link it statically. # Many supported systems don't have boost >= 1.58. Better link it statically.
message(STATUS "Boost will be statically linked") message(STATUS "Boost will be statically linked")
set(Boost_USE_STATIC_LIBS ON) set(Boost_USE_STATIC_LIBS ON)
else(NOT DEFINED Boost_USE_STATIC_LIBS OR Boost_USE_STATIC_LIBS) else(NOT DEFINED Boost_USE_STATIC_LIBS OR Boost_USE_STATIC_LIBS)
@ -116,7 +116,7 @@ function(target_add_boost TARGET)
set(Boost_USE_STATIC_LIBS OFF) set(Boost_USE_STATIC_LIBS OFF)
endif(NOT DEFINED Boost_USE_STATIC_LIBS OR Boost_USE_STATIC_LIBS) endif(NOT DEFINED Boost_USE_STATIC_LIBS OR Boost_USE_STATIC_LIBS)
set(BOOST_THREAD_VERSION 4) set(BOOST_THREAD_VERSION 4)
find_package(Boost 1.57.0 find_package(Boost 1.58.0
REQUIRED REQUIRED
COMPONENTS ${ARGN}) COMPONENTS ${ARGN})
target_include_directories(${TARGET} SYSTEM PUBLIC ${Boost_INCLUDE_DIRS}) target_include_directories(${TARGET} SYSTEM PUBLIC ${Boost_INCLUDE_DIRS})