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

Mike Jackson imikejackson at gmail.com
Thu Aug 2 10:55:01 EDT 2007



On Aug 2, 2007, at 10:39 AM, Eric Noulard wrote:

> [...]
>
> 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.

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 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. 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.
   When you are ready to commit changes back to cvs, if you right- 
click on directories that have changes instead of clicking on the  
project, then eclipse will effectively ignore the Build Tree all  
together. I have been doing it this way for about a year now. Seems  
to work just fine but it is not obvious to do it this way for a first  
time CDT user. It took some experimentation to figure this out.

The pros of putting a sub-rooted build tree in the source dir when  
using Eclipse is the following:
   Eclipse seems to have an easier time indexing your project
   CDT seems to have an easier time finding compiled products.
   Setup of debugging seemed more straight forward. Right click the  
executable and "Debug local Application"

Just some observations on how I personally use eclipse and cmake. YMMV.
-- 
Mike Jackson   Senior Research Engineer
Innovative Management & Technology Services



More information about the CMake mailing list