[build2] Generation of compilation databases on Linux

Boris Kolpackov boris at codesynthesis.com
Sun Sep 23 21:57:09 UTC 2018

luizfernandoafrabrito at gmail.com <luizfernandoafrabrito at gmail.com> writes:

> I'm amazed with build2 however I could not find how to generate a
> compilation database (compile_commands.json) on Linux.

Yes, this item is on our TODO list. We have all the information and
should be able to generate it quite easily. Hopefully we will get to
this soon.

> I tried the following with build2:
> $ bear b
> but this generated an empty compile_commands.json

I am not sure what's bear's problem with build2; maybe it's the
fact that the build system itself is multi-threaded and issues
compilation jobs simultaneously? Try to run it in the serial mode:

$ bear b -s

More information about the users mailing list