Boost logo

Boost :

From: Rene Rivera (grafik_at_[hidden])
Date: 2001-12-16 11:27:14


I thought the general Boost community might be interested in some changes I
made to the Boost (Jam) build rules...

I'm using the Boost build system in my current project and I ran into a couple
of problems that made using it outside of Boost a little painful. My two major
pains where the inability to specify system include paths without them being
nuked somewhere. And the awkwardness of trying to use variants, but having to
define basically all the settings in a variant.

The changes I've made are simple...

1. I added a <sysinclude> path feature that adds to the STDHDRS variable. With
this I also changed the include flag for gcc to use "-isystem" instead of "-I"
because that makes sure the includes fall in the correct place.

2. I modified the definition of variants to be: "variant name [ on
parent-name... ] ...". This reads, define a variant "name" based on the
"parent-name(s)" variants. This makes it so that one can define a new variant
by changing only a few features that "override" the features in the parent(s).

These two changes make it so that I can, in my project, do something as such:
>>>
project-root ;

variant thot-common
    : <threading>multi
        <rtti>off
        <sysinclude>$(CVSROOT)
    ;

variant thot-debug on thot-common debug : ;

variant thot-release on thot-common release : ;

variant thot-profile on thot-common profile : ;

>>>--a bunch of stuff cut here--

subinclude utilities/diff_test ;

subproject utilities/diff_test ;

exe diff_test
    : diff_test.cpp
        ../../base/Difference.cpp
        ../../base/DataTransferImp.cpp
        <lib>../../opencl
    : <sysinclude>$(OPENCL)
    : thot-debug thot-profile
    ;
>>>
It's simple, easy to read, and makes managing global settings a breaze. It
also happens to make for a much smaller "features.jam".

The files that I changes are attached, but they are based of the 1.25.x
versions so it would take a bit of work from someone, hint-hint, to integrate
into the latest and greatest.

-- grafik - Don't Assume Anything
-- rrivera_at_[hidden] - grafik_at_[hidden]
-- 102708583_at_icq - Grafik666_at_AIM - Grafik_at_[hidden]


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk