Boost logo

Boost-Build :

Subject: Re: [Boost-build] generators for creating HPP files?
From: Oliver Kowalke (k-oli_at_[hidden])
Date: 2010-05-26 10:06:25


Am 26.05.2010 14:37, schrieb Steven Watanabe:
> AMDG
>
> Oliver Kowalke wrote:
>> How can I use generators inside Jamfile to provide specifi HPP files
>> depending upon conditions evaluated inside the Jamfile?
>>
>> boost/my_lib/a.tmpl
>> boost/my_lib/b.tmpl
>> should be copied to boost/my_lib/c.hpp depending on <toolset>gcc.
>
> This is a bad idea for a boost library. People like me
> try to compile with both msvc and gcc using the same
> headers. You can do it with Boost.Build, but it would
> be better to use

> 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!

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 ?

Oliver


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