Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Exact purpose of CDT_SOURCE and CDT_OUTPUT pathentries ?

On Wednesday 05 October 2011, Alexander Neundorf wrote:
> On Saturday 01 October 2011, Alexander Neundorf wrote:
> > Hi,
> > 
> > I'm currently the maintainer of the Eclipse CDT project file generator in
> > CMake. I.e. CMake can generate for any cmake-based project simple
> > Makefile- based projects, or Visual Studio projects, XCode projects,
> > CodeBlocks projects and also Eclipse CDT projects.
> > Now I need some help.
> > 
> > I was looking for a documentation of the .cproject file format, but
> > didn't find one.
> > The CDT reference manual helps somewhat:
> > http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.cdt.doc.isv
> > %2
> > Freference%2Fapi%2Forg%2Feclipse%2Fcdt%2Fcore%2Fmodel%2FIPathEntry.html
> > 
> > So, what I'd like to know what the purpose of the CDT_SOURCE and
> > CDT_OUTPUT pathentry's in the .cproject file are exactly, i.e. at which
> > point and for which actions they are used.
> > AFAIK CDT_SOURCE must be related to the indexer.
> > 
> > So, which directories should I add as CDT_SOURCE ?
> > All directories which contain source files which will be compiled ?
> > Or all directories which contain targets which will be built (this can
> > differ from above, since targets can also use source files from other
> > directories). And, if I forget to add some directories, which negative
> > effect will this have ?
> > 
> > And the same for CDT_OUTPUT.
> > What is this used for ?
> 
> To give a bit more context.
> The Eclipse-project generator in CMake makes it possible to directly create
> a cdt-project from any cmake-based project, and import that directly into
> Eclipse.
> It does that by writing a .project and a .cproject file, based on the
> contents of the CMakeLists.txt of the project.
> In order to provide the best possible user experience for developers using
> cmake-based projects with Eclipse, the project generator in CMake needs to
> produce as complete and correct cdt project files as possible.
> 
> What it already does is it puts the complete include directories of the
> project, including the built-in include directories of gcc into the project
> files, also the built-in macros from the compiler.
> 
> This makes autocompletion and highlighting, including #ifdefs, work.
> 
> Now, we have some bugs in the cmake bug tracker where users say that the
> Eclipse source indexer does not work properly with the project files
> generated by CMake.
> 
> I suspect that this might be related to not setting the "src" pathentry
> correctly.
> 
> That's why it would be nice if you could provide some information on how
> this entry is used, and which directories should be listed as "src"
> pathentries.

Any hints ?

Alex


Back to the top