I've been using CMake and Eclipse for a bunch of different projects over the last several years. Although many aspects of both CMake and Eclipse have improved over the years, using them together still has a lot of problems.
>From what I understand, you have three choices when setting up a project: 1) Use in-source builds. 2) Use out-of-source builds with a single generated project. 3) Use out-of-source builds with both a build project and a source project. Option (1) has a lot of problems, especially if you have multiple build configurations. I won't go into the details here, but most of the CMake tutorials I've seen recommend against this. Option (2) means that you can't use EGit or any other version control system integrated with Eclipse. Option (3) means that Eclipse thinks that you have two copies of every source file - every time you search, or open a file by name, you get two entries for the same file. Usually what you end up with is an editor window with lots of duplicate tabs. Now, some people have recommended that you set the "derived" flag on the source files in the "build" project to cause Eclipse to ignore the files in that project, but this creates even worse problems. For one thing, the error links in the build console output point to the build project, not the source project. So when you get a compiler error and click on the link, it opens the wrong version of the file. Thus you still end up with an editor window full of duplicate tabs - and if you select the wrong one and type a character, you get the annoying "this is a derived file, are you sure you want to edit it?" dialog. This happens frequently enough to be a serious annoyance - I generally end up turning 'derived' off since it's less painful. There's a fourth option, actually, which is use a different IDE :) However, my projects tend to be multi-language projects - i.e. they have support libraries for C++, Python, Java, and so on. They also tend to have a lot of custom build targets (an example would be a script that invokes the Google protobuf generator). Unfortunately, there aren't very many decent IDEs that can handle more than one source language or custom build targets. -- -- Talin
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake