[boost.build] Reducing warnings on system headers, -isystem vs -I

View: New views
3 Messages — Rating Filter:   Alert me  

[boost.build] Reducing warnings on system headers, -isystem vs -I

by Thursday :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm using  .h files from a Microsoft library, compiling with gcc/mingw. I've set up my *.jam files, and things compile ok.

The problem is an incredible amount of warnings from the included .h system headers. I don't have control over these files, but its hard to see errors from my own code when the library has ~250 lines of warnings.  I dumped the compile instructions to a log and saw them included with "-I". (in the old makefile I'm trying to replace, " -isystem " was used).

Anyway to specify no warnings for these headers (or compile w/ -isystem) ? I tried playing with the project : <warnings>off stuff, but it seemed a little too powerful - no errors at all!

My current setup is something like this:

#### site-config.jam ###

project site-config : requirements <warnings>off ;
lib dx_d3d9 : : <name>d3d9 <search>$(path_to_lib) : : <include>$(path_to_include) ;


### Jamroot.jam ###
project main : requirements <warnings>on ;
exe main : [ glob *.cc ] /site-config//dx_d3d9 ;





_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build

Re: [boost.build] Reducing warnings on system headers, -isystem vs -I

by Vladimir Prus-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Brian Dahlquist wrote:

> I'm using  .h files from a Microsoft library, compiling with gcc/mingw. I've set up my *.jam
> files, and things compile ok.
>
> The problem is an incredible amount of warnings from the included .h system headers. I don't have
> control over these files, but its hard to see errors from my own code when the library has ~250
> lines of warnings.  I dumped the compile instructions to a log and saw them included with "-I".
> (in the old makefile I'm trying to replace, " -isystem " was used).
>
> Anyway to specify no warnings for these headers (or compile w/ -isystem) ? I tried playing with
> the project : <warnings>off stuff, but it seemed a little too powerful - no errors at all!
>
> My current setup is something like this:
>
> #### site-config.jam ###
>
> project site-config : requirements <warnings>off
>  ;
> lib dx_d3d9 : : <name>d3d9 <search>$(path_to_lib) : : <include>$(path_to_include) ;

Hi Brian,

can you try this:

 lib dx_d3d9 : : <name>d3d9 <search>$(path_to_lib) : : <cflags>"-isystem $(path_to_include)" ;

- Volodya


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build

Re: [boost.build] Reducing warnings on system headers, -isystem vs -I

by Thursday :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>> Anyway to specify no warnings for these headers (or compile w/ -isystem) ? I tried playing with
>> the project : <warnings>off stuff, but it seemed a little too powerful - no errors at all!
>Hi Brian,
>
>can you try this:
>
> lib dx_d3d9 : : <name>d3d9 <search>$(path_to_lib) : : <cflags>"-isystem $(path_to_include)" ;
>
>- Volodya

This gets it right, thanks!

I had a few problems with my path because it had spaces in it, was surrounded in quotes, and the quotations were removed. Fixed with escapes on the variable:

local path_to_include = \""C:/Program Files (x86)/.../Include"\" ;


     
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build