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

Dirk Bächle tshortik at gmx.de
Thu Nov 7 15:20:58 EST 2013


Hi Leandro,

On 07.11.2013 14:29, Leandro Moreno wrote:

>

> Hi Dirk and SCons list! I'm Leandro from Cordoba, Argentina. I work

> with Matias Iturburu in fbuild

> https://bitbucket.org/fudepan/fudepan-build

>

> On Thu, Nov 7, 2013 at 5:16 AM, Dirk Bächle <tshortik at gmx.de

> <mailto:tshortik at gmx.de>> wrote:

>

> 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.

>

>

> We already know this. But in this case, We don't want to give include

> paths to the compiler. We're working in a Builder for Cppcheck (a

> static analyzer code). I can pass the include paths to Cppcheck. The

> problem with that is that Cppcheck will check all my headers included.


sorry, but I don't get why you wouldn't want to do that. If you don't
pass the same full list of include folders to CppCheck like for the CPP
compiler, how can you be sure that the "hidden" header files (in the
folders that you don't scan) don't introduce any errors?

Best regards,

Dirk

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20131107/7752d33b/attachment.html


More information about the Scons-users mailing list