Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2002-09-24 02:54:56


Markus,

>>>to work around a compiler optimzier bug, I have to set
>>>a compiler option on a specific source file but I have
>>>not found any way to do this so far.
>>>
>>>Could anyone please help me with this?
>>
>>Is there a #pragma you can use?
>>If not, your stuck with using a separate lib on Boost.Build v1.
>>
>
>
> Thanks for your answer, Dave. Unfortunately there is no pragma
> available for this. And it's a source file for a library, therefore
> using a new library for this is quite cumbersome as libraries
> can't be combined with v1.

did you worked this around already? If not, I have a very crude idea ---
definite kluge. Each toolset defines a rule called "C++-action", which
set ups build actions. You can tweak that rule for a given toolset, so
that it notices when the problematic file is compiled and changes
options appropriately. This *completely* bypasses all the build system
machinery, but per-source requirements can't be added to V1.

To determine when you're compiling problematic file, you can look at the
first argument of the rule. For example, you might be looking for

<dir1/dir2/library1/.....>file.o

This is only an idea, not 100% finished recipe. Feel free to ask if you
run in any problems with it.

- Volodya

 


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