ArchiveOrangemail archive

CDT General developers list.


cdt-dev.eclipse.org
(List home) (Recent threads) (252 other Eclipse IDE lists)

Subscription Options

  • RSS or Atom: Read-only subscription using a browser or aggregator. This is the recommended way if you don't need to send messages to the list. You can learn more about feed syndication and clients here.
  • Conventional: All messages are delivered to your mail address, and you can reply. To subscribe, send an email to the list's subscribe address with "subscribe" in the subject line, or visit the list's homepage here.
  • Moderate traffic list: up to 30 messages per day
  • This list contains about 11,554 messages, beginning Nov 2009
  • 0 messages added yesterday
Report the Spam
This button sends a spam report to the moderator. Please use it sparingly. For other removal requests, read this.
Are you sure? yes no

Exact purpose of CDT_SOURCE and CDT_OUTPUT pathentries ?

Ad
Alexander Neundorf 1317496823Sat, 01 Oct 2011 19:20:23 +0000 (UTC)
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?topi...

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 ?

Thanks
Alex
Alexander Neundorf 1317840659Wed, 05 Oct 2011 18:50:59 +0000 (UTC)
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?topi...
> 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.

Thanks
Alex
Alexander Neundorf 1318690673Sat, 15 Oct 2011 14:57:53 +0000 (UTC)
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?topi...
> > %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
Schaefer, Doug 1318699873Sat, 15 Oct 2011 17:31:13 +0000 (UTC)
I don't really have an answer. But as I've mentioned to CMake developers in the past, the .cproject file is an internal file that can change format or even disappear at any time. In fact, we're moving more of our settings to project scoped preferences as we go.

For me, I get the most value out of CMake when it generates Makefiles and I can call them from CDT's Makefile projects. I have on my wish list a way to automate setting up projects like that at some point with a New Project wizard.

The point is CDT isn't like XCode or VisualStudio. It's actually, probably, at the same level as CMake, since it's really platform agnostic.

Doug.> -----Original Message-----
> From:  [mailto:]
> On Behalf Of Alexander Neundorf
> Sent: Saturday, October 15, 2011 10:56 AM
> To: 
> Subject: 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?topi...
> > > c.isv
> > > %2
> > >
> Freference%2Fapi%2Forg%2Feclipse%2Fcdt%2Fcore%2Fmodel%2FIPathEntr
> y.h
> > > tml
> > >
> > > 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
> _______________________________________________
> cdt-dev mailing list
> 
> https://dev.eclipse.org/mailman/listinfo/cdt-...
Alexander Neundorf 1318700907Sat, 15 Oct 2011 17:48:27 +0000 (UTC)
On Saturday 15 October 2011, Schaefer, Doug wrote:
> I don't really have an answer. But as I've mentioned to CMake developers in
> the past, the .cproject file is an internal file that can change format or
> even disappear at any time.That's ok.
CMake is following the changing file formats of all IDEs it supports :-)> In fact, we're moving more of our settings to
> project scoped preferences as we go.
> 
> For me, I get the most value out of CMake when it generates Makefiles and I
> can call them from CDT's Makefile projects.That's what the Eclipse project generator in CMake does. It generates 
Makefiles and additionally an Eclipse project file for a Makefile-based 
project, which uses them.
This project can then be imported in Eclipse.> I have on my wish list a way
> to automate setting up projects like that at some point with a New Project
> wizard.
> 
> The point is CDT isn't like XCode or VisualStudio. It's actually, probably,
> at the same level as CMake, since it's really platform agnostic.From my POV, it makes a lot of sense for cmake to generate project files for 
Eclipse.
CMake helped me a lot to be able to use XCode or Visual Studio (since I didn't 
have to learn how to set up a project in them or how to add files to a 
project, etc.), and it does the same for me with Eclipse :-)

Alex
Home | About | Privacy