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. <div><br><div>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.</div>
<div><br></div><div>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.<br>
<br><div class="gmail_quote">2012/3/27 Andreas Pakulat <span dir="ltr"><<a href="mailto:apaku@gmx.de">apaku@gmx.de</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 27.03.12 09:06:53, Alexander Rössler wrote:<br>
> Well, well. It seems that not the search directories are the problem, but<br>
> the includefiles themselves. In the avr include files, a lot macros are<br>
> used and a lot of the function calls are only small macros depending on the<br>
> avr model which is used. kdevelep seems not recognize these macros.<br>
> However, I send you the project, maybe you can figure out the problem (you<br>
> need avr-gcc installed to get the include files).<br>
<br>
</div>That usually means you'll also have the macros inside of #idef XYZ<br>
blocks. So Kdevelop does not only need to know about the include-dirs<br>
but also the defines set for your source files. This is currently only<br>
supported when using CMake (and might fail in some cases when KDevelop<br>
doesn't understand your cmake code well enough), when using the<br>
custom-buildsystem plugin (where you can configure the defines and their<br>
values that are set by the actual buildsystem too) or when gcc itself<br>
provides the defines among its set of default ones (I believe kdevelop<br>
runs gcc to find these out already).<br>
<br>
In all other cases you're out of luck and kdevelop will only see the<br>
#else-block if there is one.<br>
<span class="HOEnZb"><font color="#888888"><br>
Andreas<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
--<br>
KDevelop-devel mailing list<br>
<a href="mailto:KDevelop-devel@kdevelop.org">KDevelop-devel@kdevelop.org</a><br>
<a href="https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel" target="_blank">https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel</a><br>
</div></div></blockquote></div><br></div></div>