Boost logo

Boost Users :

Subject: Re: [Boost-users] Lean and mean boost
From: Anthony Foiani (tkil_at_[hidden])
Date: 2011-06-21 21:01:00


Robert, greetings --

Robert Bielik <robert.bielik_at_[hidden]> writes:
> Also, I don't need all of boost, just some parts of it...

I've had good luck with automated scripts that:

1. Download the requested boost tarball (if it's not already present
   on the filesystem)

2. Unpack it

3. Build only the libraries that I use (or, at least, remove large
   libraries that I /don't/ use)

4. Install headers and libs to my project's "staging" area

5. Build my project against the staging area

6. Copy only libraries from boost (no headers) to the project's final
   "root" area.

(This is for an embedded project, if you hadn't already guessed.)

This gives me all the advantages that Robert Ramey mentions
(reproducibility etc) as well as a smaller footprint: since I don't
use python, wave, graph, math, etc, I simply exclude them at build
time.

My actual bjam invocation looks like so:

    export ZLIB_BINARY="z"
    export ZLIB_INCLUDE="$PLATFORM_STAGE"/include
    export ZLIB_LIBPATH="$PLATFORM_STAGE"/lib

    export BZIP2_BINARY="bz2"
    export BZIP2_INCLUDE="$PLATFORM_STAGE"/include
    export BZIP2_LIBPATH="$PLATFORM_STAGE"/lib

    # debug_conf=""
    debug_conf="--debug-configuration"

    log boost: building and installing
    PATH="$bx"/bin:$PATH \
    "$bjam" --prefix="$PLATFORM_STAGE" \
            --without-graph \
            --without-graph_parallel \
            --without-math \
            --without-mpi \
            --without-python \
            --without-serialization \
            --without-wave \
            $MAKE_PARALLEL_ARGS \
            $debug_conf \
            link=shared \
            runtime-link=shared \
            install || exit $?

> That's not what I'm doing. The build script is for building
> everything within a project to eventually produce installer files,
> totally automated.

Why not build from a release tarball, instead of pulling from SVN?

Best regards,
Tony


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net