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

Eric Noulard eric.noulard at gmail.com
Thu Aug 2 17:15:45 EDT 2007


2007/8/2, Mike Jackson <imikejackson at gmail.com>:
> On Aug 2, 2007, at 10:39 AM, Eric Noulard wrote:
> > When using out-of-source build with CMake
> > (including Visual Studio) the project file is generated in the
> > Build Tree
> > not the Source Tree.
>
> LIke I said, Eclipse is NOT like other IDEs and therefor should NOT
> be treated the same. I think trying to have a Build tree outside of
> the Eclipse "project" directory is going to get klunky for the CDT
> user.

I was only talking about having BuildTree == ProjectRootTree
and SourceTree elsewhere and Your ProjectRootTree contains
a LinkRessource to the Source.

It works perfectly with Eclipse CDT but the CVS Team menu :((

Your option is doing the converse:

SourceTree == ProjectRootTree
and putting the BuildTree as reference and/or a sub-directory of
the SourceTree.
it works just as perfectly as the previous option with Team Menu enabled.

Your option is good but it's breaking CMake philosophy where ALL
generated files are put in the BuildTree.

May be the .project and .cproject should be created in the BuildTree
and a symbolic link may be created inside SourceTree?

> I assume that I will end having a CDT project that is really my
> Build tree, then another generic project that is my Source tree. The
> Build Tree project will have references/links to the Source Tree? I
> guess that works.

I did try this scheme (manually not with CMake CDT Gen) and did not
manage to do it.
However this scheme breaks CMake philosophy too since
you need to Generate a .project/.cproject for your SourceTree inside
the source tree :))

> Kinda clutters up my project view a bit, but
> everyone works differently, so to each his own.
>
> >
> >> 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.
> >
>
> I kinda boot strap the process a bit. My project was _already_ in cvs
> start off, so all the CVS Directories are in the source tree and NONE
> will ever be in the build tree. Eclipse will pick this up when you
> "share" the project from within eclipse. CDT will recognize the fact
> that there are CVS directories and try to use that information when
> you "share" the project.

Ok I understand, I did experiment your scheme
this works perfectly if your root project dir is the source tree,
but since Eclipse stores the .project/.cproject within project root tree
you NEED (Eclipse requirement) to put this 2 generated files in the source tree.

Even if your build tree is inside or outside the source tree.
And yes in this case the Team works correctly because Eclipse
find the CVS/ directory in the Project Root Tree which is indeed
your CVS handled source tree.


-- 
Erk


More information about the CMake mailing list