[CMake] Eclipse CDT4 CMake Generator - Pre-Alpha version

Eric Noulard eric.noulard at gmail.com
Thu Aug 2 10:39:33 EDT 2007


2007/8/2, Mike Jackson <imikejackson at gmail.com>:
> On Aug 2, 2007, at 5:34 AM, Eric Noulard wrote:
>
> > Eclipse assume the top-level project folder MUST be under version
> > control
> > which is not the case with the current approach of the Eclipse CDT
> > Generator
> > which put .project and .cproject in the Build tree
> > (this is indeed a good idea for generated files :))
> >
> > I see 3 ways to go:
> >
> > 1) Stick to eclipse constraint and generate .project and .cproject
> >     in the source tree and put the Build_tree as a LinkedRessource
> >     this is more or less the converse of what the Generator
> > currently does.
> >
> > 1bis) If one wants to use CMake Eclipse CDT generator and
> >         Eclipse Code Management to work he MUST do in-source built
> >        i.e. CMAKE_BINARY_DIR==CMAKE_SOURCE_DIR
> >        In this case the CDT Generator should be modified
> >        in order to detect if it has been called in- or out-of source
> >        since for a in-source built the currently generated .project
> >        does not work because it generates a "self-reference"
> >        due to the LinkRessources to itself.
> >
> > 2) Ask Eclipse Team to consider authoring "partial" sharing of
> > project tree.
> >
> > 3) Accept that CMake generated Eclipse project won't offer Team Menu
> >     feature.
>
> As an everyday, 8 hours a day, eclipse CDT user the way that _I_ have
> been setting up my projects is to have the CMake Build Tree rooted in
> a Directory called "Build", which is just inside the project

[...]

Yes this a working solution but using this solution is not as
natural as it is for CMake CDT Generator since it still
needs to generate .project/.cproject in source dir and
the other generated stuff in "Build" dir.

When using out-of-source build with CMake
(including Visual Studio) the project file is generated in the Build Tree
not the Source Tree.

> As to #3, I can always "Share" a project from the Team menu after I
> import my project.

How can you do that without effectively importing your build tree
in the CVS repo?

Using the current CDT CMake generator if I try to "Share"
the project he will ask me for a CVS repo and a module name
for my Project whereas there is none with this name in the refered CVS repo.
which ONLY contains a module whose name correspond to the source tree.


> Not sure if Eclipse CDT gets unstable when you start changing the
> project files out from underneath it. Xcode and Visual Studio seem to
> handle this pretty well. Have not had good success with this on
> Eclipse though. Just something to watch out for.

Ok about that.
Note that you can chose to set
CMAKE_SUPPRESS_REGENERATION to 1 which ask CMake
not to automagically regenerate project file unless you explicitly
ask for it.

> Again. Just some thoughts and ramblings from a current
> Cmake/Eclipse-CDT user.

Every experience seems useful to me.


-- 
Erk


More information about the CMake mailing list