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

Leandro Moreno leandro.moreno at tallertechnologies.com
Fri Nov 8 10:47:55 EST 2013


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?


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20131108/d38367a4/attachment.htm


More information about the Scons-users mailing list