KDE/kdevelop/languages/cpp

Andreas Pakulat apaku at gmx.de
Tue Jun 26 12:51:45 UTC 2007


On 26.06.07 13:55:15, 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.

Ok, so I did understand this right. So the include-path resolver is of
no use for files that are not part of the project. Except if the file
happens to have a Makefile right in the same dir that actually also will
compile that file. So "getting include paths for non-project files" is
not an argument for the resolver.

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

Yeah, I know. I was just asking wether you know of any problems that a
proper Makefile-parser would have with cmake-generated Makefiles.

Andreas

-- 
You will be audited by the Internal Revenue Service.




More information about the KDevelop-devel mailing list