I need to compile boost from sources, it is a requirement. But I only need one library regex
for a benchmark.
I have success if I clone the entire boost project with the snippet below. However downloading the entire boost every time is very expensive for the type of usage we have in mind.
However when I uncomment the line # GIT_SUBMODULES
I get many errors, in particular complaining about boost-install.jam
not existing.
ExternalProject_Add(
libboost
GIT_REPOSITORY "https://github.com/boostorg/boost.git"
# GIT_SUBMODULES tools/build tools/bcp libs/regex libs/config tools/boostdep libs/predef libs/core libs/detail libs/io libs/iterator libs/predef libs/preprocessor libs/smart_ptr libs/throw_exception libs/system libs/filesystem libs/integer tools/build tools/bcp
GIT_SHALLOW ON
GIT_SUBMODULES_RECURSE OFF
BUILD_IN_SOURCE ON
PREFIX ${CMAKE_CURRENT_SOURCE_DIR}
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/boost
TMP_DIR ${PROJECT_BINARY_DIR}/boost-tmp
STAMP_DIR ${PROJECT_BINARY_DIR}/boost-stamp
#BINARY_DIR ${PROJECT_BINARY_DIR}/boost-build
DOWNLOAD_DIR ${PROJECT_BINARY_DIR}/boost-down
CONFIGURE_COMMAND
cd ${CMAKE_CURRENT_SOURCE_DIR}/boost &&
./bootstrap.sh
--with-toolset=clang
BUILD_COMMAND
cd ${CMAKE_CURRENT_SOURCE_DIR}/boost &&
./b2 headers &&
./b2 install -q
--prefix=${CMAKE_CURRENT_SOURCE_DIR}/local
--build-type=minimal
--layout=system
--disable-icu
--with-regex
--with-system
variant=release link=static runtime-link=static
threading=single address-model=64 architecture=x86
toolset=clang
INSTALL_COMMAND ""
)
So the question is: what is the minimal number of submodules that I need to download/clone in order to make boost::regex available?
Thank you for your help!
[6/54] Performing build step for 'libboost'
FAILED: boost-stamp/libboost-build /home/hbucher/git/regex-performance/build/boost-stamp/libboost-build
cd /home/hbucher/git/regex-performance/vendor/boost && cd /home/hbucher/git/regex-performance/vendor/boost && ./b2 headers && ./b2 install -q --prefix=/home/hbucher/git/regex-performance/vendor/local --build-type=minimal --layout=system --disable-icu --with-regex variant=release link=static runtime-link=static threading=single address-model=64 architecture=x86 toolset=clang && /usr/local/bin/cmake -E touch /home/hbucher/git/regex-performance/build/boost-stamp/libboost-build
[errno 2] boost-install.jam (No such file or directory)
Jamroot:308: in boost-install
ERROR: rule "boost-install.boost-install" unknown in module "Jamfile</home/hbucher/git/regex-performance/vendor/boost>".
libs/filesystem/build/Jamfile.v2:171: in modules.load