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.

Am Dienstag, 27. September 2022, 10:57:20 CEST schrieb Waterlander, Erwin:
> Thanks Martin, I have a look.
> I do not see yet how I add a custom detection participant to my plugin.
> Which extension to use? I'm using Eclipse 4.23/CDT 10.6. Is there any

The extension point is 'org.eclipse.cdt.jsoncdb.core.detectionParticipant'. 
Not quite sure if it is present in CDT 10.6.

Just to clarify: What Jonah was suggesting is to build using the CDT CMake 
core project type and teach cmake core to handle your compiler (through the 
extension point). CDT CMake core has a mechanism to parse the 
compile_commands.json file and to pass the include paths and macros to the 
The mechanism first isolates the name of compiler executable  from each 
commandline and then determines which of the existing detection participants 
feel responsible to capture the remaining arguments.
After parsing the command lines, the detections participant for each line is 
asked to supply the compiler built-ins for macros and include paths. Usually, 
the participant will invoke the compiler with special arguments to dump its 
builtins to stdout, parse that output and supply the builtins.

> tutorial on how to create a CDT core build plugin, like there is for

Not that I am aware of it.

> managed build? I will also have a look at cmake4eclipse. I will send you a

cmake4eclipse uses the same mechanism as above to feed the indexer. The only 
difference is that is based on *managed build*.


Cd wrttn wtht vwls s mch trsr.

Back to the top