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

Dirk Bächle tshortik at gmx.de
Sun Nov 10 12:59:41 EST 2013


On 08.11.2013 16:57, Matias Iturburu wrote:

> I'll try to clarify Leandro's point.

> Sorry, our mother language is not English.

>

>

> 2013/11/8 Leandro Moreno <leandro.moreno at tallertechnologies.com

> <mailto:leandro.moreno at tallertechnologies.com>>

>

> I can see that I didn't express well at all. I pass the same

> Includes to cppCheck than compiler. My problem is other. In all

> the include paths, I have headers (.h), and I need it to create a

> suppression-list for CppCheck. So, my question is, what is the

> better way to take all the headers form that directories?

>

>

> CppCheck uses, in fact, the same paths than g++ to resolve the

> header's location.

> Thing is, it goes and check everything you are including, that

> involves some third party code that we don't care for.

> So we need to use a "suppression list". In that list, you tell

> cppcheck which files you don't want written down in your report.

> That's why we wanted to plug into the default scanner, and list out

> all the actual headers files.

>

> We, actually, managed to make a useful suppression list, but cppcheck

> has some outstanding bugs and are blocking our progress.

>


If you can define a positive list of paths that should get searched by
CppCheck, I'd recommend to define your own version of the INCFLAGS
variable in your Builder. It could look something like this:

env['CPPCHKPATH'] = ['first/path','second/path']
env['CPPCHK_INCFLAGS'] = '$( ${_concat(INCPREFIX, CPPCHKPATH, INCSUFFIX,
__env__, RDirs, TARGET, SOURCE)} $)'

, then add the new $CPPCHK_INCFLAGS to your Builder's command for CppCheck.


Regards,

Dirk

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20131110/d6e7ca26/attachment.htm


More information about the Scons-users mailing list