Boost logo

Boost-Build :

Subject: Re: [Boost-build] generators for creating HPP files?
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-05-26 13:02:06


AMDG

Oliver Kowalke wrote:
> Am 26.05.2010 14:37, schrieb Steven Watanabe:
>> c.hpp:
>> #ifdef __GNUC__
>> #include <boost/my_lib/a.tmpl>
>> #else
>> #include <boost/my_lib/b.tmpl>
>> #endif
>
> I think this is a bad idea because c.hpp can evaluate to include
> a.tmpl and the logic in Jamfile.v2 concludes to use b.tmpl inside c.cpp!

But you can avoid that situation, since you control both the headers
and the Jamfile. Anything that prevents different build configurations
from coexisting is totally unacceptable, IMHO.

> For instance 'bjam toolset=gcc' builds the lib with a certain POSIX
> feature. 'bjam toolset=gcc architecture=x86
> instruction-set=yorksfield' uses an user-defined implementation of the
> POSIX feature.
>
> So I'd like to ask again: If I use the pattern from
> build/examples/generate - how can I specify that the generated file
> has to be copied to <boost-root>/boost/my_lib ?

Use the install rule with a conditional source.

In Christ,
Steven Watanabe


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk