Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Managing include paths and macros in 'Core Build' projects.

Hi Erwin,

For discovering the built in include paths of any compiler (gcc isn't overly special) CDT runs the compiler with special command line and the compiler prints out on stdout the built in include paths.

I haven't done this myself, so my instructions may be a bit off... If your compiler doesn't behave like gcc, then the default command line mentioned above may not work, use the extension point  org.eclipse.cdt.jsoncdb.core.detectionParticipant
to configure that part. See 

I hope this sets you on the correct path.

Jonah

On Fri, Sep 23, 2022 at 2:45 AM Waterlander, Erwin <erwin.waterlander@xxxxxxxxx> wrote:
Hi,

OK, thanks. For Makefile projects I will stick to managed build. I would like to have used core build Makefile, if I could configure the CDT scanner.

> On Wed, 21 Sept 2022 at 03:59, Kondal Kolipaka <mailto:kondal.kolipaka@xxxxxxxxx> wrote:
>   AFAIK, there is no option to add include paths and macros for core CMake projects. Indexer is designed to get these details from the compiler_commands.json file after the build.

For CMake projects, I don't see yet how I can add custom include paths and macros to the CDT scanner.
When I run the CMake hello world example, I see the generated compile_commands.json file. There is no include path information in there. The CDT scanner may know the built-in include paths of gcc, but how can I let the CDT scanner know the built-in include paths and macros of my custom compiler?

regards,

--
Erwin Waterlander       Intel

From: cdt-dev <cdt-dev-bounces@xxxxxxxxxxx> On Behalf Of Jonah Graham
Sent: Thursday, September 22, 2022 13:17
To: CDT General developers list. <cdt-dev@xxxxxxxxxxx>
Subject: Re: [cdt-dev] Managing include paths and macros in 'Core Build' projects.

For core build make CDT scans the build output to determine compiler and command lines. I think there is mechanisms to extend that analysis, but I'm not sure where. You may have to dive into the CDT code. The core build make is experimental and there has been little feedback on it AFAIK. Unfortunately the person who created it is no longer active on CDT.

HTH
Jonah 

On Thu, Sep 22, 2022 at 4:42 AM Waterlander, Erwin <mailto:erwin.waterlander@xxxxxxxxx> wrote:
Hi,

And how about 'Core Build' Makefile projects?
How can my plugin add the include paths and macros for our custom compiler?

Currently I'm using 'Managed Build' project in 'unmanaged' mode, with a custom "built-in compiler settings" provider. Syntax is already correct before building.

best regards,

--
Erwin


From: cdt-dev <mailto:cdt-dev-bounces@xxxxxxxxxxx> On Behalf Of Kondal Kolipaka
Sent: Wednesday, September 21, 2022 09:59
To: CDT General developers list. <mailto:cdt-dev@xxxxxxxxxxx>
Subject: Re: [cdt-dev] Managing include paths and macros in 'Core Build' projects.

AFAIK, there is no option to add include paths and macros for core CMake projects. Indexer is designed to get these details from the compiler_commands.json file after the build.

Best Regards,
Kondal Kolipaka

On Wed, Sep 21, 2022 at 12:34 PM Waterlander, Erwin <mailto:mailto:erwin.waterlander@xxxxxxxxx> wrote:
Hi,

In 'Managed Build' projects I can add my custom Language Provider to add include paths and macros needed for syntax high lighting and code navigation.

How is this supposed to be done in 'Core Build' projects, Cmake and Make projects?

Typically Core Build projects show no includes in the Project Explorer at start. Not even the gcc includes.
Make projects have only limited options to add include paths and macros. Variables are not supported as far as I see.
In CMake project properties I see no options for include paths and macros at all.

regards,

--
Erwin Waterlander                 Intel
The Netherlands

---------------------------------------------------------------------
Intel Benelux B.V.
Registered in The Netherlands under number 24134020
Statutory seat: Rotterdam
Registered address: https://www.google.com/maps/search/Capronilaan+37,+1119NG+Schiphol-Rijk?entry=gmail&source=g

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

_______________________________________________
cdt-dev mailing list
mailto:mailto:cdt-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev
---------------------------------------------------------------------
Intel Benelux B.V.
Registered in The Netherlands under number 24134020
Statutory seat: Rotterdam
Registered address: https://www.google.com/maps/search/Capronilaan+37,+1119NG+Schiphol-Rijk?entry=gmail&source=g

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
_______________________________________________
cdt-dev mailing list
mailto:cdt-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev
--
~~~
Jonah Graham
Kichwa Coders
http://www.kichwacoders.com
---------------------------------------------------------------------
Intel Benelux B.V.
Registered in The Netherlands under number 24134020
Statutory seat: Rotterdam
Registered address: Capronilaan 37, 1119NG Schiphol-Rijk

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev
--
~~~
Jonah Graham
Kichwa Coders
www.kichwacoders.com

Back to the top