Is the situation with CMake + Eclipse ever going to get any better?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Is the situation with CMake + Eclipse ever going to get any better?

Talin
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
Reply | Threaded
Open this post in threaded view
|

Re: Is the situation with CMake + Eclipse ever going to get any better?

Alexander Neundorf-3
Hi,

On Sunday, September 27, 2015 13:29:15 Talin wrote:

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

the problem is that Eclipse does not support a directory layout where the
project file is not the root of the source directory.

In my simplistic view it would be a simple
<root dir> tag in the .project file, and Eclipse would afterwards use that
directory as root directory.

If something like that would be done in Eclipse, all those problems would be
solved.

Alex

--

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
Reply | Threaded
Open this post in threaded view
|

Re: Is the situation with CMake + Eclipse ever going to get any better?

Martin Weber-2
In reply to this post by Talin
Am Sonntag, 27. September 2015, 13:29:15 schrieb Talin:

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

If you are building C/C++ sources, set up a CDT project.
ADVERTISING:
Then let <https://marketplace.eclipse.org/content/cmake4eclipse> generate the
makefiles. (I am the author of it).

It is not perfect due to the quirks in CDT, but it avoids that extra manual
invocation of 'cmake -G whatever'.

Martin

--
Cd wrttn wtht vwls s mch trsr.


--

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
Reply | Threaded
Open this post in threaded view
|

Re: Is the situation with CMake + Eclipse ever going to get any better?

Roland Schulz
In reply to this post by Talin
Hi,

also Doug, the CDT co-lead, is working on an integration of cmake into cdt. You can find information in the archive of [hidden email]. I think you can expect well integration, similar to clion or qt-developer, with the next major release next year.

Roland 

On Mon, Sep 28, 2015 at 11:00 AM, Martin Weber <[hidden email]> wrote:
Am Sonntag, 27. September 2015, 13:29:15 schrieb Talin:
> 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.

If you are building C/C++ sources, set up a CDT project.
ADVERTISING:
Then let <https://marketplace.eclipse.org/content/cmake4eclipse> generate the
makefiles. (I am the author of it).

It is not perfect due to the quirks in CDT, but it avoids that extra manual
invocation of 'cmake -G whatever'.

Martin

--
Cd wrttn wtht vwls s mch trsr.


--

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



--
ORNL/UT Center for Molecular Biophysics cmb.ornl.gov
<a href="tel:865-241-1537" value="+18652411537" target="_blank">865-241-1537, ORNL PO BOX 2008 MS6309

--

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