|
Boost-Build : |
From: Johan Nilsson (r.johan.nilsson_at_[hidden])
Date: 2007-10-08 08:11:23
Ping?
Johan Nilsson wrote:
> Vladimir Prus wrote:
>> On Friday 05 October 2007 10:25:03 Johan Nilsson wrote:
>>> Hi,
>>>
>>> after attempting to use precompiled headers toghether with gcc
>>> 4.1.2, I figured I might as well post my "findings" here.
>>>
>>> Pre-4.2.0 gcc can't handle pch and anonymous namespaces in headers,
>>> ref: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29085
>>>
>>> This makes it virtually impossible to use pch toghether with e.g.
>>> Boost.Lambda, Boost.Parameter to build programs with multiple
>>> translation units.
>>>
>>> Perhaps a note of this could be added to the BBv2 pch docs?
>>
>> Possibly, thanks for letting know.
>
> Also, it seems like the base name of the pch header needs to be
> exactly the
> same as the pch target name. Does the provided example (in the docs)
> really
> work?
>
>>
>>>
>>> Also - is it possible to disable pch using conditional requirements,
>>> making the pch rule effectively returning a "null" target?
>>
>> The <pch>off feature will have that effect.
>
> Thanks. However, adding <toolset>gcc:<pch>off to my root project
> properties
> caused everything to rebuild as /pch-off/ was added to the target
> paths. Not
> much to do about it I guess, but annoying nevertheless.
>
> Is there possibly a way to obtain the effect of the imagined
> conditional requirement
> "<toolset>gcc,<toolset-version-below>4.2.0:<pch>off" without
> resorting to indirect conditional requirements?
>
> One final point: Inside the pch target definition, I also setup the
> path to
> the pch header as an <include> requirement as I have multiple levels
> of
> source directories within the project. As a result of this, when
> turning off
> pch, the source files fails to compile (they no longer find the
> actual pch
> header file).
>
> Do you have any suggestions for how to handle the above in a generic,
> clean
> way?
>
> / Johan
>
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost-build
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