[CMake] Patch for Eclipse generator

a.neundorf-work at gmx.net a.neundorf-work at gmx.net
Mon Oct 22 05:14:32 EDT 2007


Hi,

On Monday 22 October 2007 07:26, Miguel A. Figueroa-Villanueva wrote:
> On 10/21/07, Pau Garcia i Quiles wrote:
...
> > > How about that:
> > >
> > > If you run cmake in-source, everything should just work.
> > >
> > > If you run cmake out-of-source, cmake creates two eclipse projects: one
> > > project in the source tree, where you can't build anything, but which
> > > you should import in eclipse to have version control working, and the
> > > actual project in the build tree, where you build stuff (but don't have
> > > version control). The in-source version control project only would have
> > > to be created if it doesn't exist yet.
> > > What do you think about this ?
> >
> > That might work but I don't see the point.
>
> Well, I definitely see the point, and I think it is a much better
> route than putting the build projects in the source tree... But I
> still disagree that this route to go... last time I checked it was
> trivial to create a version control project in Eclipse (very few
> clicks). For CMake to generate them it would need to be an option,
> since I might not want Eclipse to handle that.  Also, CMake would need
> to know what type of version control it is and how to generate the
> project for it... 

For the beginning it could start with checking for a CVS/ or .svn/ directory.

> All of this isn't too hard, but it isn't harder 
> creating it manually.

I'm not using eclipse, so it's a bit hard for me to comment.

The following things should be possible with the eclipse generator:

1) in-source builds with version control

2) multiple out-of-source builds for one source tree which don't mess up each 
other. There should be a straight forward way to get version control working.

Since Eclipse can open multiple projects, it would be nice if it would be 
possible to load projects for different build types for the same source tree 
in Eclipse. If working this way, I think it would really be not bad if there 
would be an additional project where you do the version control, otherwise 
you could do update/commit in the different build trees and this would (of 
course) affect also the other projects (for the same source tree). So having 
one "source project" (with version control) and several "build projects" 
(without version control) looks like an acceptable solution to me.

CMake can generate the "build projects". The "source project" has to come from 
somewhere. I don't know how complicated this is to do in cmake. If it's easy 
I think it would be nice ("run cmake, load the generated "source project" and 
the "build project"). If it's easy to do it manually, it is also ok if it is 
documented in the wiki, but I think this will be a bit harder to use ("run 
cmake, load the "build project", then open that menu, create a new project, 
check this and that, then you have the "source project").

There are currently two Eclipse-related wiki pages:

http://www.cmake.org/Wiki/Eclipse_CDT4_Generator_Development
http://www.cmake.org/Wiki/CMake:Eclipse

I guess there should be only one and this one needs to document how to do 
in-source builds and how to do multiple out-of-source builds with Eclipse.

...
> If you can work around these issues in the CMake code, then fine. But
> if it is going to limit the use of CMake then maybe it is time to
> consider submitting a patch to Eclipse... I don't have the time to

Yes.

Bye
Alex



More information about the CMake mailing list