Boost build fixes

bootstrap.sh seems completely broken in boost 1.76.0 when you want to
use something other than the default compiler: it doesn't respect CXX
anymore, and if you give it --cxx to specify the CXX compiler it
produces a broken project-config.bjam file that prevents the project
from building.

Just skip that crap and build and use b2 ourselves.
This commit is contained in:
Jason Rhinelander 2021-04-20 23:55:12 -03:00
parent da50c398c1
commit 5b5e8436d0

View file

@ -398,13 +398,15 @@ build_external(boost
${boost_patch_commands} ${boost_patch_commands}
CONFIGURE_COMMAND CONFIGURE_COMMAND
${CMAKE_COMMAND} -E env ${boost_bootstrap_cxx} ${CMAKE_COMMAND} -E env ${boost_bootstrap_cxx}
./bootstrap.sh --without-icu --prefix=${DEPS_DESTDIR} --with-toolset=${boost_toolset} ./tools/build/src/engine/build.sh ${boost_toolset} "--cxx=${deps_cxx}"
--with-libraries=program_options,system,thread,serialization BUILD_COMMAND
BUILD_COMMAND true cp tools/build/src/engine/b2 .
INSTALL_COMMAND INSTALL_COMMAND
./b2 -d0 variant=release link=static runtime-link=static optimization=speed ${boost_extra} ./b2 -d0 variant=release link=static runtime-link=static optimization=speed ${boost_extra}
threading=multi threadapi=${boost_threadapi} ${boost_buildflags} cxxstd=14 visibility=global threading=multi threadapi=${boost_threadapi} ${boost_buildflags} cxxstd=17 visibility=global
--disable-icu --user-config=${CMAKE_CURRENT_BINARY_DIR}/user-config.bjam --disable-icu --user-config=${CMAKE_CURRENT_BINARY_DIR}/user-config.bjam
--prefix=${DEPS_DESTDIR} --exec-prefix=${DEPS_DESTDIR} --libdir=${DEPS_DESTDIR}/lib --includedir=${DEPS_DESTDIR}/include
--with-program_options --with-system --with-thread --with-serialization
install install
BUILD_BYPRODUCTS BUILD_BYPRODUCTS
${DEPS_DESTDIR}/lib/libboost_program_options.a ${DEPS_DESTDIR}/lib/libboost_program_options.a