Cmake support

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

Cmake support

Mark B
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
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: Cmake support

Jonah Graham
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, <[hidden email]> 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
[hidden email]
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
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: Cmake support

Fabrizio Iannetti
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 <[hidden email]> 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, <[hidden email]> 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
[hidden email]
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
[hidden email]
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
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: Cmake support

Jonah Graham
Hi Fabrizio,

> but I could not figure out the proper way to do it.

I think you have hit the nail on the head here. I am not sure it is clear what the proper way is either. The CMake plug-ins are experimental and open to change.

Thanks,
Jonah

~~~
Jonah Graham
Kichwa Coders
www.kichwacoders.com


On Mon, 13 Jan 2020 at 02:22, Fabrizio Iannetti <[hidden email]> 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 <[hidden email]> 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, <[hidden email]> 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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: Cmake support

Alexander Fedorov
If you have ideas how we can improve UX please don't hesitate to create a bugzilla ticket, the UI sketches in any form are very welcome too.

Regards,
AF

13.01.2020 17:59, Jonah Graham пишет:
Hi Fabrizio,

> but I could not figure out the proper way to do it.

I think you have hit the nail on the head here. I am not sure it is clear what the proper way is either. The CMake plug-ins are experimental and open to change.

Thanks,
Jonah

~~~
Jonah Graham
Kichwa Coders
www.kichwacoders.com


On Mon, 13 Jan 2020 at 02:22, Fabrizio Iannetti <[hidden email]> 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 <[hidden email]> 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, <[hidden email]> 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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: Cmake support

Mark B
In reply to this post by Fabrizio Iannetti
>cmake settings are only available on the default configuration >(by pressing the gear beside the launch configuration name as >Jonah said)

It seems another good to reason to move the setting under c/c++ build of project properties. Or at least to create a shortcut to it.

Il lun 13 gen 2020, 08:22 Fabrizio Iannetti <[hidden email]> ha scritto:
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 <[hidden email]> 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, <[hidden email]> 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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: Cmake support

Marc-Andre Laperle-3
In reply to this post by Fabrizio Iannetti
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 <[hidden email]> 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 <[hidden email]> 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, <[hidden email]> 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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: Cmake support

Fabrizio Iannetti
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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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, <[hidden email]> 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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: Cmake support

Marc-Andre Laperle-3
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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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, <[hidden email]> 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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: Cmake support

Mark B
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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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, <[hidden email]> 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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: Cmake support

Fabrizio Iannetti
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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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, <[hidden email]> 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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: Cmake support

Mark B
I tried too the compilation database solution but there's no way to let indexer understand c++11 using -std=c++11 compile option.

Il gio 16 gen 2020, 07:36 Fabrizio Iannetti <[hidden email]> ha scritto:
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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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, <[hidden email]> 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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: Cmake support

Marc-Andre Laperle-3
In reply to this post by Fabrizio Iannetti
Hi!

As before (for managed build projects at least!) you need the GCC Built-in Compiler Settings provider. The output parsers don’t handle built-ins. It’s also where you have to specify -std=c++11 since it affects built-ins a lot.
Handling flags that affect built-ins in output parsers opens the question of what to do when the flags are not the same between files, given that the indexer saves a single variant of (most) built-in headers.

Marc-André

On Jan 16, 2020, at 01:36, Fabrizio Iannetti <[hidden email]> wrote:


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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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, <[hidden email]> 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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: Cmake support

sergei.kovalchuk
In reply to this post by Mark B
Hi All,

Today I spent a couple of hours under the Fabrizio's project.
I've tunned it a little bit in order to use the original make file
generator.
The project was built fine for me.

Please find in attach.

Sorry if my investigations not related for "cmake" support.



On 2020-01-16 11:57, Mark B wrote:

> I tried too the compilation database solution but there's no way to
> let indexer understand c++11 using -std=c++11 compile option.
>
> Il gio 16 gen 2020, 07:36 Fabrizio Iannetti
> <[hidden email]> ha scritto:
>
>> 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?
>>
>> the project is in this repo:
>>
> https://github.com/fabrizioiannetti/cdt-by-example/tree/master/mb_compile_commands
>>
>> cheers
>> Fabrizio
>>
>> On Wed, 15 Jan 2020 at 15:00, Mark B <[hidden email]>
>> 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 <[hidden email]>
>> 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:
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=559186
>>
>> Marc-André
>>
>> On Jan 14, 2020, at 5:44 PM, Fabrizio Iannetti
>> <[hidden email]> 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
>> <[hidden email]> 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
>> https://wiki.eclipse.org/CDT/User/NewIn910#Build
>> 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
>> <[hidden email]> 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 <[hidden email]>
>> 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, <[hidden email]>
>> 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
>> [hidden email]
>> 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
>> [hidden email]
>> 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
> [hidden email]
> 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
> [hidden email]
> 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
> [hidden email]
> 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
> [hidden email]
> 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
> [hidden email]
> 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
> [hidden email]
> 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
> [hidden email]
> 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
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev

mb_compile_commands.zip (12K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Cmake support

Mark B
In reply to this post by Marc-Andre Laperle-3
ok, got it. Thanks.

Il gio 16 gen 2020, 15:41 Marc-Andre Laperle <[hidden email]> ha scritto:
Hi!

As before (for managed build projects at least!) you need the GCC Built-in Compiler Settings provider. The output parsers don’t handle built-ins. It’s also where you have to specify -std=c++11 since it affects built-ins a lot.
Handling flags that affect built-ins in output parsers opens the question of what to do when the flags are not the same between files, given that the indexer saves a single variant of (most) built-in headers.

Marc-André

On Jan 16, 2020, at 01:36, Fabrizio Iannetti <[hidden email]> wrote:


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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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, <[hidden email]> 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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: Cmake support

15 knots
In reply to this post by Fabrizio Iannetti
Does cmake4eclipse satisfy your needs? Its on the marketplace.

Martin

Am Do., 16. Jan. 2020 um 07:36 Uhr schrieb Fabrizio Iannetti <[hidden email]>:
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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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, <[hidden email]> 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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: Cmake support

Jonah Graham
Hi Marco/Fabrizio and fellow cdt-devs, 

Have either of you had a chance to look at Martin's suggestion of using cmake4eclipse? I am trying to understand what direction we (CDT) should be moving forward with and I would appreciate any thoughts on this matter.

In particular if we can have in the CDT ecosystem only one CMake solution, we should figure out how to work together in and out of the Eclipse umbrella to make that happen. If there is really a need for 2 different solutions, cmake4eclipse and the "Preview" version in CDT's repo I would like to understand what each one gives that the other does not.

Thank you all for your time,
Jonah



 
~~~
Jonah Graham
Kichwa Coders
www.kichwacoders.com


On Thu, 16 Jan 2020 at 15:18, 15 knots <[hidden email]> wrote:
Does cmake4eclipse satisfy your needs? Its on the marketplace.

Martin

Am Do., 16. Jan. 2020 um 07:36 Uhr schrieb Fabrizio Iannetti <[hidden email]>:
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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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, <[hidden email]> 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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: Cmake support

Mark B
The plugin works but I wanted to check what's the current status of cdt. Honestly I think what we have is quite far from a production solution. Too many problems to setup a project. When you create a cmake project there's no scanner option so you can't adjust anything about symbol discovery or at least I didn't find how to do it. Indeed when you setup a project using the plug-in you need to create a c/c++ project using "cmake driven" option letting you use setup a plug-in provided "provider" for discovery, more or less what the database parser suggested by Marc-André does.

At the moment I'm using a cdt managed build configured using the database parser as provider. I disabled the automatic generation of makefiles, I setup the build command to cmake -G 'Unix Makefile' then I created build targets for all/clean/package in the project. A mixed solution, but it's working quite well. Other Cdt-only solution didn't work for me.

Il lun 20 gen 2020, 19:09 Jonah Graham <[hidden email]> ha scritto:
Hi Marco/Fabrizio and fellow cdt-devs, 

Have either of you had a chance to look at Martin's suggestion of using cmake4eclipse? I am trying to understand what direction we (CDT) should be moving forward with and I would appreciate any thoughts on this matter.

In particular if we can have in the CDT ecosystem only one CMake solution, we should figure out how to work together in and out of the Eclipse umbrella to make that happen. If there is really a need for 2 different solutions, cmake4eclipse and the "Preview" version in CDT's repo I would like to understand what each one gives that the other does not.

Thank you all for your time,
Jonah



 
~~~
Jonah Graham
Kichwa Coders
www.kichwacoders.com


On Thu, 16 Jan 2020 at 15:18, 15 knots <[hidden email]> wrote:
Does cmake4eclipse satisfy your needs? Its on the marketplace.

Martin

Am Do., 16. Jan. 2020 um 07:36 Uhr schrieb Fabrizio Iannetti <[hidden email]>:
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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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, <[hidden email]> 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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
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
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: Cmake support

15 knots

Am Mo., 20. Jan. 2020 um 19:51 Uhr schrieb Mark B <[hidden email]>:
The plugin works but I wanted to check what's the current status of cdt. Honestly I think what we have is quite far from a production solution. Too many problems to setup a project. When you create a cmake project there's no scanner option so you can't adjust anything about symbol discovery or at least I didn't find how to do it. Indeed when you setup a project using the plug-in you need to create a c/c++ project using "cmake driven" option letting you use setup a plug-in provided "provider" for discovery, more or less what the database parser suggested
 
The "cmake driven" option is something that comes from cmake4eclipse, not from CDT.

Martin


_______________________________________________
cdt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: Cmake support

Mark B
Yes, you are right, I meant that you need to create a "cdt managed-like" project in order to adjust discovery options. There's no way to do something similar with CDT cmake project.

Il lun 20 gen 2020, 20:21 15 knots <[hidden email]> ha scritto:

Am Mo., 20. Jan. 2020 um 19:51 Uhr schrieb Mark B <[hidden email]>:
The plugin works but I wanted to check what's the current status of cdt. Honestly I think what we have is quite far from a production solution. Too many problems to setup a project. When you create a cmake project there's no scanner option so you can't adjust anything about symbol discovery or at least I didn't find how to do it. Indeed when you setup a project using the plug-in you need to create a c/c++ project using "cmake driven" option letting you use setup a plug-in provided "provider" for discovery, more or less what the database parser suggested
 
The "cmake driven" option is something that comes from cmake4eclipse, not from CDT.

Martin

_______________________________________________
cdt-dev mailing list
[hidden email]
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
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/cdt-dev
12