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 Montag, 3. Oktober 2022, 12:57:20 CEST schrieb Waterlander, Erwin:
> -----Original Message-----
> From: cdt-dev <cdt-dev-bounces@xxxxxxxxxxx> On Behalf Of Martin Weber
> Sent: Tuesday, September 27, 2022 21:38
> To: cdt-dev@xxxxxxxxxxx
> Subject: Re: [cdt-dev] Managing include paths and macros in 'Core Build'
> projects.
> > 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 indexer. 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.
> Hi,
> 
> So this means that if I you run different C compilers, with their own
> specific macros and includes, on different source files in a single build
> from the same CMake file, you still get correct syntax highlighting for all
> the source files. Right?

Yes.

/Martin

-- 
Cd wrttn wtht vwls s mch trsr.






Back to the top