How do I select a minimal subset of boost libraries necessary for my project?

Problem

How do I select a subset of boost libraries?

Solution

First, compile boost bcp.

Next, generate a file containing the fullpaths to all the files of your project. Suggestion:

find <root of your project> grep -P "\.(c|cpp|h|hpp)$" > files.txt

Then, use bcp to copy the necessary boost source files to another directory

cat files.txt | xargs -I {} ./bcp --scan --boost=<path to a clean boost dir> {} <path to the destination dir>

By default, the build module of boost is not copied, so you have to copy it explicitly

./bcp build --boost=<path to a clean boost dir> {} <path to the destination dir>

Advertisements

One thought on “How do I select a minimal subset of boost libraries necessary for my project?”

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s