[Scons-users] How to call the include scanner?

Dirk Bächle tshortik at gmx.de
Thu Nov 7 03:16:47 EST 2013


Hi Matias,

On 06.11.2013 14:18, Matias Iturburu wrote:

> It is possible to call the default C++ and/or C scanner (that

> responsible of finding #include s) from a builder or another kind of

> function?

>

> I'm working on a Tool that runs CppCheck

> (http://cppcheck.sourceforge.net/) and I need to feed it with a list

> of paths where it can find headers. This is, more or less, the same

> that gcc needs and SCons provides by default.

>


you should be able to use part of the CXXCOM (or CCCOM) variable
definition, which compiles the single include paths as given by $CPPPATH
into a fully expanded list of "-I/include_folder1 -I/include_folder2".
Try adding something like "$_CPPINCFLAGS" to your CppCheck command.


> Also, can I override that scanner to do some parsing on it?

>


Yes, it is possible to derive your own Scanner class from the default
ones, and then install them instead. Can you tell us a little bit more
about what you are trying to accomplish?

Regards,

Dirk



More information about the Scons-users mailing list