Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Cmake support

Does cmake4eclipse satisfy your needs? Its on the marketplace.

Martin

Am Do., 16. Jan. 2020 um 07:36 Uhr schrieb Fabrizio Iannetti <fabrizio.iannetti@xxxxxxxxx>:
Hi Marc-Andre,

I tried to create from scratch a super-simple project that uses the compile commands database, but I could not get it working, could you have a look if you spot something obviously wrong?



image.png

cheers
Fabrizio


On Wed, 15 Jan 2020 at 15:00, Mark B <marco.stornelli@xxxxxxxxx> wrote:
Other problem with cmake support: there aren't no scanner options, eclipse doesn't understand c++11 with old compiler like gcc 4.8. In json file there's -std=c++11 but it's not enough. I don't know if it would work using Marc-André method I need to try.

Il mer 15 gen 2020, 04:50 Marc-Andre Laperle <malaperle@xxxxxxxxx> ha scritto:
Hi Fabrizio,

I agree the variables would be nice. It didn’t make it in the first version :) I made a bug to track this:

Marc-André


On Jan 14, 2020, at 5:44 PM, Fabrizio Iannetti <fabrizio.iannetti@xxxxxxxxx> wrote:

Hi Marc-Andre,

yes I saw that and I gave it a first try, seems to exactly solve the problem, although still hard to find for a typical user.

One suggestion I have is to allow using variables in the path to the compilation database so that one can specify a location relative to the project/workspace location, thus allowing the project files to be committed to a repository and be usable by any user regardless of where the project is.

cheers
Fabrizio


On Tue, 14 Jan 2020 at 04:48, Marc-Andre Laperle <malaperle@xxxxxxxxx> wrote:
Hi,

I know it’s not very forward thinking but I actually use the old “managed build” Makefile (empty) project type and change the build command to ninja (or whatever you need). Then the compilation database parsing can be done with the new-ish Language Settings Provider
It’s more manual but it works for any build system that produce a compilation database.

Cheers,
Marc-André


On Jan 13, 2020, at 2:21 AM, Fabrizio Iannetti <fabrizio.iannetti@xxxxxxxxx> wrote:

Hi,

I have also done some experiments to use the built-in cmake support, mainly because it automatically feeds the indexer with the compilation database generated by cmake instead of having to set up the gcc output parsing manually.
(at work we use a makefile project and run cmake using a script to create the Makefile)

From my point of view it is ok for a simple program/demo, but impractical for any serious project, as e.g.

1. cmake settings are only available on the default configuration (by pressing the gear beside the launch configuration name as Jonah said)
2. if a different launch configuration is selected (manually created, e.g. to launch a specific executable) the cmake settings are not visible, effectively making it impossible to change the generator from ninja to make
3. the settings are stored in the user scope, so each user that checks out the project has to change them manually
4. there seems to be no real concept of configuration to have builds with different cmake options (apart from debug/run)

I also tried to look at the code to see if I could somehow contribute (top of my list would be adding support for different configurations), but I could not figure out the proper way to do it.
If someone has a suggestion on how to do that I would be happy to help.

cheers
Fabrizio



On Sun, 12 Jan 2020 at 14:27, Jonah Graham <jonah@xxxxxxxxxxxxxxxx> wrote:
Hi Marco, 

You need to press one of the gear buttons in the launchbar. I fell over this the other day too when trying the meson integration and it is very much not as expected for anyone who has being using CDT/Eclipse and used to finding this stuff in the project properties.

HTH, 
Jonah 


On Sun., Jan. 12, 2020, 03:34 marco, <marco.stornelli@xxxxxxxxx> wrote:
Hi guys,

I was trying to create a cmkae project in Eclipse without using the
plugin cmake4eclipse. Honestly from user point of view seems quite a
mess. There are two ways and it's not clear why:

new c/c++ project -> cmake project
new c++ project -> cmake driven

With the first there's no option unless the button "cmake gui". I'm not
able to do anything and it seems CDT wants to use always Ninja as generator.

With the second one more options are available but I have the same
problem with generator.

Looking at source code I found CMakeBuildTab with this definition in xml:

<extension       point="org.eclipse.cdt.launch.coreBuildTab">
<provider          nature="org.eclipse.cdt.cmake.core.cmakeNature"
             priority="10"
tabClass="org.eclipse.cdt.cmake.ui.internal.CMakeBuildTab">
       </provider>
    </extension>

In this page I should be able to select Ninja or Makefile but I didn't
find a way to open this page.
Even the cmake hello world doesn't work.
Can someone explain how it supposed to work the cmake support?

Thanks.
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev

Back to the top