[CMake] Best practices when using CMake 2.6 and Eclipse CDT 6.0

Philip Lowman philip at yhbt.com
Fri Oct 2 06:51:30 EDT 2009


On Fri, Oct 2, 2009 at 4:03 AM, Romain CHANU <romainchanu at gmail.com> wrote:

> Hi,
>
> I am starting to use Eclipse CDT 6.0 / CMake 2.6 for C++ development and I
> would like to have some information on how to integrate these two software
> together.
>
> I have been reading these pages:
>
> http://www.itk.org/Wiki/CMake:Eclipse
> http://www.itk.org/Wiki/Eclipse_CDT4_Generator
>
> However, they seem quite out-dated :-\
>
> Could anyone tell me what are the best procedures / practices to follow
> when using the latest version of Eclipse and CMake?
>
>
Hi,

We use option #1 on this page (the CMake CDT4 generator) with a completely
out-of-source build directory and we think it works pretty well.
http://www.itk.org/Wiki/CMake:Eclipse

By completely out-of-source I mean something like this:
Source dir in:  /home/user/source/Foo
Build dir in:    /home/user/workspace/Foo.linux

Some other suggestions are to always remember to set CMAKE_BUILD_TYPE to
Debug if you want debugging to work in Eclipse.  Also this[1] bug is still
in the wild, so avoid naming executables the same name as a PROJECT().

[1] = http://public.kitware.com/Bug/view.php?id=5938

Also, there are some improvements in preprocessor statement highlighting in
CMake 2.8.0 RC so you might want to try that version out.
http://www.cmake.org/files/v2.8/

HTH

-- 
Philip Lowman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20091002/d778e593/attachment-0001.htm>


More information about the CMake mailing list