From cbff9c6914008b198690587434bf919625856ce8 Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Wed, 5 Sep 2018 01:10:24 +0300 Subject: [PATCH] Build boost with C++14 --- .ci/script.sh | 11 +++++++++++ deps/cmake/Boost.cmake | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.ci/script.sh b/.ci/script.sh index 309e5915..69433dba 100755 --- a/.ci/script.sh +++ b/.ci/script.sh @@ -2,6 +2,17 @@ set -ex +if [ $TRAVIS_OS_NAME == linux ]; then + export CC=${C_COMPILER} + export CXX=${CXX_COMPILER} + + sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/${C_COMPILER} 10 + sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/${CXX_COMPILER} 10 + + sudo update-alternatives --set gcc "/usr/bin/${C_COMPILER}" + sudo update-alternatives --set g++ "/usr/bin/${CXX_COMPILER}" +fi + if [ $TRAVIS_OS_NAME == linux ]; then source /opt/qt${QT_PKG}/bin/qt${QT_PKG}-env.sh || true; fi diff --git a/deps/cmake/Boost.cmake b/deps/cmake/Boost.cmake index 572d1d07..27dc0c21 100644 --- a/deps/cmake/Boost.cmake +++ b/deps/cmake/Boost.cmake @@ -16,7 +16,7 @@ ExternalProject_Add( CONFIGURE_COMMAND ${DEPS_BUILD_DIR}/boost/bootstrap.sh --with-libraries=random,thread,system,iostreams,atomic,chrono,date_time,regex --prefix=${DEPS_INSTALL_DIR} - BUILD_COMMAND ${DEPS_BUILD_DIR}/boost/b2 -d0 variant=release link=static threading=multi --layout=system + BUILD_COMMAND ${DEPS_BUILD_DIR}/boost/b2 -d0 cxxstd=14 variant=release link=static threading=multi --layout=system INSTALL_COMMAND ${DEPS_BUILD_DIR}/boost/b2 -d0 install )