[cmake-developers] Better Eclipse CDT support

Alexander Neundorf neundorf at kde.org
Fri Apr 29 14:55:45 EDT 2011


On Thursday 28 April 2011, Oliver Buchtala wrote:
...
> wst-file is allright and I see that all projects are generated :)
>
> Unfortunately, this working set stuff is yet a bit inconvenient, as it
> is not an Eclipse built-in.
>
> What you need to do:
> 0. Switch to C/C++ perspective (maybe this is the empty project
> observation you described?)
> 1. Import eclipse projects (all from the CDT_ECLIPSE_OUTPUT_DIR)
>  -> you see all projects flat side by side?

I have to import all the projects in eclipse/ manually one by one ?
I mean, there are twenty or more, I didn't count.
I don't really feel like doing this.

> 2. Import wst file
> 3. Goto 'Select Working Sets...' (in Project Explorer)
> 4. Select all (three) working sets
> 5. Goto 'Top Level Elements' (in Project Explorer) and activate 'Working
> Sets'
> Now you should see the projects within working sets
>
> Note1: almost all are in the CMake working sets, as FOLDERs are only set
> for MSVC generators
> Note2: once I experienced that the working sets plugin spoiled my
> workspace some how and I had import from scratch
> after deleting .metadata in workspace directory and restart eclipse and
> then redo that importing.
>
> Helps?
>
> I want to create an Eclipse Plugin which shall make all this more
> convenient and more automatically.
> Something like a CMake enabling 'Solution' file that manages imported
> projects and working sets etc...
> But yet I am a PDE beginner... so, this will take some more weeks...

That sounds like a great plan :-)

But, for me, the thing which sucks by far most about the Eclipse generator, is 
that Eclipse has these problems with out-of-source building.
AFAIK Eclipse expects that the project file is at the root of the source tree, 
and that e.g. also the svn etc. directories are in this tree.

Now a golden rule of cmake is to never generate stuff into the source dir, but 
always only into the binary dir. Otherwise it is not really possible to have 
multiple build dirs for one source dir.

So, if you think about starting to work on Eclipse, it would be *great* if you 
could try to make Eclipse support project root dir != dir of the project 
file, i.e. out-of-source builds.

Alex



More information about the cmake-developers mailing list