Bug 569517 - Since Eclipse 2020-09, cmake support is unusable
Summary: Since Eclipse 2020-09, cmake support is unusable
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-cmake (show other bugs)
Version: 10.0.1   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: cdt-build-inbox@eclipse.org CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-07 00:07 EST by Sven Köhler CLA
Modified: 2020-12-07 20:55 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Köhler CLA 2020-12-07 00:07:44 EST
I experience a lot of trouble with the recent cmake support. In a previous version, I have been using the CDT cmake support, and I was productive with it.

For some reason, you have introduced this new toolbar with the following layout in the Eclipse C/C++ edition:
3 buttons (build, run/debug, stop) and 3 dropdown menus (Run/Debug, Launch Config, Launch Target).

I create a project via File->New->C/C++ Project. Then I select Empty or Existing CMake Project and adjust the paths accodingly.

Once the project is created, I can build the project using the build button in the new toolbar. When I hit the build button, the project is _rebuilt_. No changes were done whatsoever. Why is the project being rebuilt?

Also, a default launch configuration is created. To configure it, I click the little gear-wheel in the new toolbar. I cannot configure command line arguments, the working directory, or anything useful.
Also, the created launch configurations cannot be found in the old-school run configurations dialog.

When I create an old-school run configuration, Eclipse tends to build the wrong binary via cmake. Of course, the whole project is rebuilt. Again, no changes to the sources were done.

I shall now downgrade Eclipse. It used to work to some degree. With Eclipse 2020-09, cmake support is completely broken. This should have never been released, as it is a considerable downgrade from the previous version.
Comment 1 Sven Köhler CLA 2020-12-07 09:13:33 EST
I did not downgrade Eclipse. Instead, I created a Makefile that simply invokes cmake to build the project. Then I created a Makefile project and use the build command make CONF=${ConfigName}. By passing $(CONF) in an appropriate way to cmake, I can even build Debug and Release targets.

I am much more satisfied with that then with the current cmake support.

Eclipse does not build the configuration (Debug or Release) even if I chose "Select Automatically" in the run configuration. But that's just a small drawback compared to the issues I had with the cmake integration. Maybe there is an option to tell Eclipse which binary belongs to which configuration.
Comment 2 Sven Köhler CLA 2020-12-07 09:20:43 EST
Eclipse does not build the correct configuration (Debug or Release) when I choose "Select Automatically" in the run configuration. I did properly configure the Output Locations of each configuration. Yet, Eclipse does not seem to able to use that information. Specifying the configuration explicitly in the run configuration works like a charm though.
Comment 3 Martin Weber CLA 2020-12-07 14:21:16 EST
(In reply to Sven Köhler from comment #0)
> For some reason, you have introduced this new toolbar with the following
> layout in the Eclipse C/C++ edition:
> 3 buttons (build, run/debug, stop) and 3 dropdown menus (Run/Debug, Launch
> Config, Launch Target).

That is just an alternative way to start a build.
You can still build using the Project | Build Project menu.
Comment 4 Sven Köhler CLA 2020-12-07 20:55:14 EST
(In reply to Martin Weber from comment #3)
> That is just an alternative way to start a build.
> You can still build using the Project | Build Project menu.

I wish I could. The "old" build button is grayed out and doesn't work.