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 Freitag, 23. September 2022, 13:27:54 CEST schrieb Jonah Graham:
> Hi Erwin,

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
> https://github.com/eclipse-cdt/cdt/tree/main/jsoncdb/org.eclipse.cdt.jsoncdb
> .microsoft for an example.

Better look at <https://github.com/eclipse-cdt/cdt/tree/main/jsoncdb/
org.eclipse.cdt.jsoncdb.nvidia>, it is a more elaborated example.
Gcc builtin detection is here <https://github.com/eclipse-cdt/cdt/blob/main/
jsoncdb/org.eclipse.cdt.jsoncdb.core/src/org/eclipse/cdt/jsoncdb/core/
participant/builtins/GccOutputProcessor.java>

Note that the extension point is used by CDT *cmake core build* as well as by 
my cmake4eclipse-plugin. The latter is to integrate cmake into CDT *managed 
build*.

If you have any question, send me a PM.

/Martin

-- 
Cd wrttn wtht vwls s mch trsr.






Back to the top