So here are the problems you are going to run into with Eclipse and CMake.

There is no proper integration between CMake and Eclipse.

There is no plugin that can manage the CMake file and the C++ project together. In other words, Eclipse has 2 types of Projects: Managed C+ + and Makefile. If you let Eclipse manage your project it will produce makefiles. This is NOT what you want. If you tell Eclipse you want a "Makefile" project, then _you_ have to generate the makefile for Eclipse. You can also tell Eclipse which makefile to use when Eclipse runs "make" to build the project. This is done as a custom build command. I usually use "make -C ${project_loc}/Build" for mine. If you have true "out of source" builds your build command might be "make -C ${project_loc}/.../ProjectBuild".

Eclipse CDT indexing can be tricky to get "right". Make sure you understand how Eclipse defines its "Paths and Symbols" entries.

Also, if you could elaborate on your "Complex purposes" the cmake community will be eager to help you solve those issues and come up the cmake learning curve quickly as possible.

If you are cross-compiling there are some entries on the wiki about that.

Respectfully
Mike Jackson

On Feb 3, 2008, at 5:38 PM, Giualian Sander wrote:

Hi Mike,

Thanks a lot for your advices,

I perfectly understand your point of view but in my case I'm willing to bring some capabilities to a "population" of developers (not necessarily hackers), that can enables us to abstract from the lowest layers of computing (usually autohell-handled).

Your contribution, unfortunately, do'nt help me...

Using CMake the way your example suggest, seems to me irrelevant for a 3 lines Makefile just do the trick.

I need CMake for much more complex purposes...

BRgds

2008/2/3, Mike Jackson <[EMAIL PROTECTED]>:
I gave that plugin a try out and while it is nice to graphically "see" the structure of a CMake file there did not seem to be any actual project management or any other features that I could figure out.

I work with CMake and Eclipse (On OS X and Linux 64) all day long. You have already heard from one individual on his project setup so I will throw mine in.

http://www.cmake.org/Wiki/CMake:Eclipse_UNIX_Tutorial

Basically I primarily use the terminal with cmake/ccmake to generate the makefiles for my system, then use Eclipse in "Makefile Project" mode to do the actual development of code and compilation. As long as you are using a compiler that Eclipse understands, Eclipse will parse the compiler output and display errors and warnings for you.

I find this works very well for my needs.

I do second the idea of using <http://www.cthing.com/CMakeEd.asp> for a nice CMake editor. Within eclipse there are ways to create "External Tools" that could possibly bootstrap the whole process if needed.

When working with Eclipse I _strongly_ recommend you put your build directory inside the top level of your project. Eclipse seems to work better that way. In the latest CMake CVS there are eclipse project generators. You are welcome to give those a try to see if they gel with your project layout needs.

My basic Project setup is:

-Project
  -src // All source files
  -Resources // All extra files the project needs
  -Build // Run cmake from in here (cmake ../)

This works for _me_ in my situation. My projects can be viewed here: <http://titanium.imts.us/>. Also, a small bit of advice for those new to CMake: Watch how you name files and folders that might be at the top level of your project. Sometimes it is tempting to do something like:

-Project
  -src // All source files
  -Resources // All extra files the project needs
  -cmake // Cmake related files in here
  -Build // Run cmake from in here (cmake ../)

Problem with that is at some point you _will_ accidentally run cmake from within the project directory. CMake creates _lots_ of its own files. All with Cmake somewhere in the name. If you also have a top level folder with CMake in the name it can be difficult to figure out which files/folders need to be trashed. This is why is use "Resources" and then put some of my special cmake files in that folder.

Just FYI. Welcome to the cmake community.
-----------
Mike Jackson


On Feb 2, 2008, at 6:52 PM, Giualian Sander wrote:

Hi gents,

I'm new to cmake, and I've found a project called CMakeBuilder (www.cmakebuilder.com) across the internet.

I'm a C++/Autohell developer from years (let's says decades !) And I found interesting the visual approach of this tool, especially for understanding CMake structure and syntax.


Even if it's beta right now, I think it brings some "easy to learn"-capability to CMake

Do anyone of you know about the upcoming features as described on eclipseplugincentral.com ?

I'm currently in charge of a "from scratch" project, working with a lot of eclipse/C++ developers, and I'm not willing to maintain a AutoHell configuration on such a scale.

Thought I'm conviced that CMake is the right choice for me, is such a plugin a good choice for me ?

Thanks for your advices....

BRgds

Giualian Sander



_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to