Skip to content

Generate Framework compilation database from CLI #5

@jim-bcom

Description

@jim-bcom

PROBLEM
Currently, to generate the files for this project, we need to generate the Framework compilation database from QtCreator by enabling qmake system() and clicking on Build->Generate Compilation Database for "SolARFramework".
In order to be able to automate the process of bulding this project, e.g. by our CI, we need a way to be able to do this via CLI.

SUGGESTED SOLUTION
I've been trying to use bear that aimed at doing creating this file from a Makefile-based project.

cd SolARFramework
mkdir build
cd build
qmake ../SolARFramework.pro -spec linux-g++
bear make

Unfortunately, when passed to the xpcf_grpc_gen tool, the resulting project seems to be missing a lot of files.
We may need to either check bear has been used properly (did I miss some options?) or find another bear-like tool, or update xpcf_grpc_gen in order to be able to parse the file generated by bear as well, if it is verified that it is well-formed.
Attached to this issue, the two compile_commands.json, one generated by QtCreator, the other one generated by bear.

compile_commands-qtcreator.json.txt
compile_commands-bear.json.txt

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions