Boost logo

Boost-Build :

From: Rene Rivera (grafik666_at_[hidden])
Date: 2003-05-25 23:33:11

[2003-05-25] Beman Dawes wrote:

>The Comeau compiler under Windows has an option (--a) which we need to
>compile most Boost tests correctly. It both increases compliance and adds
>certain warning messages.
>OTOH, --a cannot be used to compiler certain Windows SDK headers such as
>winnt.h. There are a few Boost files which use these problem headers.
>What is the best way to setup the como-win32 toolset to default to --a, but
>allow --a to be turned off for certain compiles?
>PS: I've been back and forth with Greg Comeau about --a, and he may someday
>get it to accept Windows headers with warnings rather than errors, but that
>isn't going to happen right away.

Well the best way would be to have a #pragma to turn off the --a before
including the winnt.h header. But I guess that's not going to happen either

As for the toolset, the answer depends on the granularity you want...

If you need control on a per target basis (lib/dll/exe) then it's as easy as
adding a feature to map the flag onto. This is what I just did to the
darwin-tools.jam, and added a <warnings>on/off feature.

But if you need control on a per file basis then the naswer is complicated,
because it's not really supported by BBv1. But a hack that will work is to
declare a free-feature to specify files which should have warnings disabled,
and check as each file is compiled to add, or not, the --a flag. And to make
it easy for you.. attached is a patch to the current como-win32-tools.jam
which does that ;-) With it you can specify <no-warn>some_file.cpp in the
requirements section which will not get the --a flag.


-- grafik - Don't Assume Anything
-- rrivera_at_[hidden] - grafik_at_[hidden]
-- 102708583_at_icq --1047239-2675965952-3262894393=:9000 Content-Type: application/octet-stream; Name="como-win32-tools.jam.diff"; X-Mac-Type="54455854"; X-Mac-Creator="522A6368"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; Filename="como-win32-tools.jam.diff"

[Attachment content not displayed.] --1047239-2675965952-3262894393=:9000--

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at