Code completion search paths

Alexander Rössler mail.aroessler at gmail.com
Tue Mar 27 14:49:39 UTC 2012


Ok, I tried to set avr-gcc in the cmake settings dialog and the same
problem happens and yes in the avr include files have a lot of µC model
specific stuff, separated with ifdefs, in it.

But playing with the settings I figured out another problem with a simple C
Cmake project: When using time.h some functions like time() are not
recognized until time.h was opened once in kdevelop.

Another thing I found out is that kdevelop has settings for make and also a
settings how many threads it should use (-j), it would be great if kdevelop
would set this setting per default to the core count of the CPU.

2012/3/27 Andreas Pakulat <apaku at gmx.de>

> On 27.03.12 09:06:53, Alexander Rössler wrote:
> > Well, well. It seems that not the search directories are the problem, but
> > the includefiles themselves. In the avr include files, a lot macros are
> > used and a lot of the function calls are only small macros depending on
> the
> > avr model which is used. kdevelep seems not recognize these macros.
> > However, I send you the project, maybe you can figure out the problem
> (you
> > need avr-gcc installed to get the include files).
>
> That usually means you'll also have the macros inside of #idef XYZ
> blocks. So Kdevelop does not only need to know about the include-dirs
> but also the defines set for your source files. This is currently only
> supported when using CMake (and might fail in some cases when KDevelop
> doesn't understand your cmake code well enough), when using the
> custom-buildsystem plugin (where you can configure the defines and their
> values that are set by the actual buildsystem too) or when gcc itself
> provides the defines among its set of default ones (I believe kdevelop
> runs gcc to find these out already).
>
> In all other cases you're out of luck and kdevelop will only see the
> #else-block if there is one.
>
> Andreas
>
>
> --
> KDevelop-devel mailing list
> KDevelop-devel at kdevelop.org
> https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20120327/4eb148dc/attachment.html>


More information about the KDevelop-devel mailing list