bear

generate compilation database for Clang tooling

Install

All systems
curl cmd.cat/bear.sh
Debian Debian
apt-get install bear
Ubuntu
apt-get install bear
image/svg+xml Kali Linux
apt-get install bear
Fedora
dnf install bear
Windows (WSL2)
sudo apt-get update sudo apt-get install bear
OS X
brew install bear
Raspbian
apt-get install bear

bear

generate compilation database for Clang tooling

Bear records the flags passed to the compiler for each translation unit and stores them in a JSON file. This file can be used by Clang's tooling interface and programs like clang-check to process a translation unit. cmake supports the generation of JSON compilation databases out of the box. For any other build system that does not support this, Bear can be used instead to intercept the invocation of the compiler.