Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Are managed projects a requirement/recommendation or the new build system is enough?


> On 9 Dec 2020, at 23:03, Martin Weber <fifteenknots505@xxxxxxxxx> wrote:
> 
> - Makefile project:  Users have to maintain their buildscripts. Users have to 
> teach the indexer about include paths and macros.

not an optimal solution

> - MBS aka Managed (Makefile) Build System: CDT generates the build-scripts for 
> users. CDT itself provides buildscript-generation for the 'make' build tool 
> only. Tries to teach the indexer about include paths and macros by parsing 
> build output (focused on gcc).

I did not check the source code, but, at least in theory, it does not need to parse the output, since it already knows the full command line for each file (because it generates it).

> Users may additonally to teach the indexer 
> about include paths and macros.

users do not need to teach the indexer separately, users need to teach the build system about the include paths and macros, the indexer is an indirect beneficiary.

> - The thing called 'core build'. ...
> ...  Tries to teach the indexer about include paths and macros by parsing 
> build output (focused on gcc). Provides no mean for users to teach the 
> indexer.

I'm not very concerned about the current UI, I'm more concerned on the internals.

is there any API to teach the indexer what are the command lines for each file? ideally it should be one to parse the command_commands.json.

> CDT-cmake, CDT-meson and CDT-qt?? are based on that core-build thing.

according to my tests, cdt-cmake was not very encouraging, for unknown reasons the indexer did not go into system headers.

> CDT-cmake feeds include paths and macros specified in the user's  
> CMakeLists.txt files to the indexer.

really? parsing CMakeLists.txt is not exactly a joyride.

---

all 3 builder generators considered for my use case (cmake, meson, xpbuild) create the command_commands.json file, so I would start by assuming that this file is available, and do not bother with parsing console output.


regards,

Liviu



Back to the top