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

Matias Iturburu matias.iturburu at tallertechnologies.com
Fri Nov 8 10:57:02 EST 2013


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>


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



>

> On Thu, Nov 7, 2013 at 5:20 PM, Dirk Bächle <tshortik at gmx.de> wrote:

>

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

>>

>>

>> _______________________________________________

>> Scons-users mailing list

>> Scons-users at scons.org

>> http://four.pairlist.net/mailman/listinfo/scons-users

>>

>>

>

>

> --

> <http://www.tallertechnologies.com>

> Leandro Moreno

> Intern Engineer

>

> San Lorenzo 47, 3rd Floor, Office 5

> Córdoba, Argentina

>

> Phone: +54 351 4217888 / +54 351 4218211

> Skype: letossgm

>

>

> _______________________________________________

> Scons-users mailing list

> Scons-users at scons.org

> http://four.pairlist.net/mailman/listinfo/scons-users

>

>



--
<http://www.tallertechnologies.com>
Matías Iturburu
Software Engineer




*San Lorenzo 47, 3rd Floor, Office 5 Córdoba, Argentina *

*Phone: +54 351 4217888 / +54 351 4218211 Skype: matias.iturburu*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20131108/dea4d764/attachment.html


More information about the Scons-users mailing list