Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] CMake support in Eclipse CDT


On 2015-12-01 23:37, Alexander Neundorf wrote:
> 4) Tell the indexer about include paths and pre-processor macros.

> A file with buildsystem metadata as proposed in [2] would be of great help.

> My plugin parses the output of the actual build-tool, but that fails if

> compiler invocations do not show up in the build output:

>

> - `make` runs with -s option or .SILENT is in the makeflie.

>

> - On windows, cc gets its commandline options from a response file, e.g.:

> `gcc @options_file`; no chance to grab include paths in this case.

>

> - 'ninja` suppresses commandline output on its own behalf, it uses an

> environment var to specify the output format. (Newer versions have a

> -verbose option)

>

> To summarize:

> It would be of great help to integrate CMake support in CDT, if cmake

> would be able to spit out `buildsystem metadata`.

 

I fully agree. Using "buildsystem metadata" would IMO be so much better than trying to parse (and execute) cmake language in CDT.

 

Alex


CMake has support for writing out compilation commands to a JSON file. The variable to switch this on is called CMAKE_EXPORT_COMPILE_COMMANDS. See http://public.kitware.com/pipermail/cmake-developers/2012-June/004374.html. However, it is not publicly documented and probably only works on some generators.

I haven't followed the entire discussion, so forgive me if this has already been covered.

/Jesper
--
Jesper Eskilson Development Engineer
IAR Systems AB

Back to the top