![]() |
Boost : |
From: Christian Mazakas (christian.mazakas_at_[hidden])
Date: 2025-04-10 18:06:49
On Thu, Apr 10, 2025 at 10:27â¯AM Dennis Luehring via Boost <
boost_at_[hidden]> wrote:
> im building boost 1.87 and i only need thread+asio
>
> building:
>
> cd /home/test
> wget https://archives.boost.io/release/1.87.0/source/boost_1_87_0.tar.bz2
> tar -xf boost_1_87_0.tar.bz2
> cd boost_1_87_0
> ./bootstrap.sh --prefix=/home/test/boost_1_87_0_installed
> ./b2 variant=release --with-thread install
>
> the resulting install folder
>
> /home/test/boost_1_87_0_installed
> lib folder is ~500 KB
> include is ~142 MB
>
> is it possible to only have the needed library includes in the include
> folder?
>
One thing is to use vcpkg and just depend on boost-thread and boost-asio.
This will automatically do all the dependency resolution for you.
The other is to use the CMake build and do something like this:
cd boost-root
mkdir _build
cd _build
cmake .. -DCMAKE_INSTALL_PREFIX=_install
-DBOOST_INCLUDE_LIBRARIES="thread;asio"
cmake --build . --target install -j12
Note: you're still going to be installing a good amount of libraries here
but this at least gives you the most minimal install possible.
- Christian
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk