RE [CMake] Eclipse CDT and CMake

Andy Dingfelder DingfelderA at SirTrack.com
Mon Jul 23 23:43:40 EDT 2007


Hi Mike,

No problem at all...  the vast majority of your tutorial is spot on,
and only a couple of small issues caused me any confusion at all.  
I am familiar with make files in general and eclipse, but this is my
first exposure to cmake and hopefully my questions will help other
newcomers.

My goal here is cross platform development under eclipse and I figured
cmake was the best way to attack this.

I have gotten the basic hello world from the cmake examples download to
successfully compile from eclipse 
and am at this point trying to get it to generate both a windows exe
and linux executable.

Here are a couple of simple suggestions that might help:

1.   you might want to add some step numbers to the instructions, so
people can refer to "step 3" in questions etc.
2.   when updating your wiki, on the page where you "Select the
MakeFile Project type, choose Other Toolchain and click Next" 
if they expand the node entitled "makefile project" and choose "Hello
World C++ Project", eclipse will create the cpp file.
3.  for people new to cmake, an example CMakeLists.txt would be quite
useful.

Thanks a bunch for the great tutorial other than that.

Cheers,

- Ding

>>> "Mike Jackson" <imikejackson at gmail.com> 24/07/2007 3:05:05 p.m.
>>>
Andy, sorry for the problems that you had trying to follow my
instructions. Let me address some of your troubles.

1] The CMake Editor plugin is just that.. A plugin for Eclipse that
will do syntax coloring and some "code completion" for CMake commands
in CMake files ("CMakeLists.txt and *.cmake). This plugin does NO
project management at all. Let me repeat.. This plugin will do NO
Project management of either CMake files or Eclipse CDT projects.

When I wrote the tutorial I assumed some knowledge of CMake and how it
works and was aimed at those that wanted to use CMake in conjunction
with Eclipse. Maybe I should have stated that on the Wiki..

2] The MyProject "Example" is just a placeholder. There really is not
any example. I was just using this as an example of how to layout a
project. Again, I assumed that the reader already had a project and
was wanting to use that existing project with CMake and Eclipse. This
probably was not a good assumption. In Hind sight I should have used
an example from the actual CMake distribution. I will try and update
the wiki to use this example instead, hopefully making things more
clear.

3] "Why am I running ccmake from the comand line?" A clean project
that is based on CMake typically will NOT have any type of Makefile
ready to go. That is the point of CMake, to auto-generate Makefiles
(or other platform specific project files) from the CMakeLists.txt
file (and other supporting *.cmake files). So by default Eclipse has
no idea what to do with a CMake based project. Also not that when
setting up the project in Eclipse you need to select the "Makefile"
based project as _you_ will be providing Makefiles, generated by
CMake, to Eclipse CDT to use for the build process. By running  ccmake
or cmake (your choice) from the command line before setting too many
things in Eclipse, Eclipse will complain less or not at all when you
set up your project. This is kind of boot strapping the process a bit
as there is no real integration of CMake with Eclipse. The
"integration" is that Cmake will generate and keep up to date the
makefiles that Eclipse will use for its build.

I hope that helps explain some things. If I get some time on Tuesday,
I will rewrite parts of the Tutorial to use the Example that comes
with CMake instead of my own "virtual" example.

Again, I am sorry for the troubles that you may have had with my
instructions/tutorial. Keep asking questions and the community will
try to help answer them.

Respectfully
Mike Jackson
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
WARNING: This email and any attachments may be confidential and/or
privileged. They are intended for the addressee only and are not to be read,
used, copied or disseminated by anyone receiving them in error.  If you are
not the intended recipient, please notify the sender by return email and
delete this message and any attachments.

The views expressed in this email are those of the sender and do not
necessarily reflect the official views of Landcare Research.  

SirTrack
http://www.sirtrack.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++




More information about the CMake mailing list