How do I set scons system include path

Posted by Michael Anderson on Stack Overflow See other posts from Stack Overflow or by Michael Anderson
Published on 2010-03-14T03:05:53Z Indexed on 2010/03/14 3:15 UTC
Read the original article Hit count: 484

Filed under:
|

Using scons I can easily set my include paths:

env.Append( CPPPATH=['foo'] )

This passes the flag

-Ifoo

to gcc

However I'm trying to compile with a lot of warnings enabled. In particular with

env.Append( CPPFLAGS=['-Werror', '-Wall', '-Wextra'] )

which dies horribly on certain boost includes ... I can fix this by adding the boost includes to the system include path rather than the include path as gcc treats system includes differently.

So what I need to get passed to gcc instead of -Ifoo is

-isystem foo

I guess I could do this with the CPPFLAGS variable, but was wondering if there was a better solution built into scons.

© Stack Overflow or respective owner

Related posts about scons

Related posts about c++