KDE/kdevelop/languages/cpp

Hamish Rodda rodda at kde.org
Wed Jun 27 05:13:05 UTC 2007


On Tuesday 26 June 2007 21:55, David Nolden wrote:
> On Tuesday 26 June 2007 11:59:32 Andreas Pakulat wrote:
> > On 26.06.07 11:20:18, David Nolden wrote:
> > I don't see how the include-path-resolver can help here. IIRC it was
> > here, though not sure, that somebody posted a way to ask gcc for its
> > standard include dirs. That can be done when editing files outside any
> > project. After all thats all the paths you can find out about, without
> > having the user give you some more paths.
> >
> > Unless of course the include-path-resolver does more than just finding
> > the include-paths for a given dir.
>
> That command only finds global standard include dirs
> like /usr/include, /usr/include/c++/4.0.1 etc., but not include-dirs
> defined by the build-system, like for example the qt include-directory.
>
> KDevelop-4's code-completion will highly depend on having all include-files
> parsed, so only parsing those in global include-dirs would result in
> useless code-completion.
>
> The include-path resolver finds, when successful, all include-paths defined
> by the underlying build-system.
>
> > > Also there currently is no build-system that returns include-paths.
> > > Another question is how to reliably parse make-files to get the
> > > include-paths, in many cases that might not be possible, for example
> > > with cmake-generated makefiles.
> >
> > Whats the problem with cmake-generated Makefile's? Yes, its not
> > dead-easy to parse these as you have to "follow" forwards and such, but
> > I don't think thats impossible to parse cmake-generated makefiles.
> >
> > Andreas
>
> Why not discuss this once there is an alternative? Currently there is
> none.. I cannot test code-completion in realistic environments without
> correct include-paths.

I am with David on this one. It was frustrating to have working cmake include 
directory querying and then see it broken again (for good reason I'm sure, 
but nevertheless).  For duchain etc to advance, parsing all includes is 
critical and cannot wait until the build system stuff is ready, or all we'll 
have for the early days of KDE 4.x is a kdevelop which can navigate build 
systems but not do code completion etc.

Of course, I'd expect the workaround code to be disabled for projects with 
capable build system integration.

Cheers,
Hamish.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20070627/e55f75f1/attachment.sig>


More information about the KDevelop-devel mailing list