diff --git a/pages/common/bear.md b/pages/common/bear.md new file mode 100644 index 0000000000..d3edc9bbbb --- /dev/null +++ b/pages/common/bear.md @@ -0,0 +1,24 @@ +# bear + +> A tool to generate compilation databases for `clang` tooling. +> More information: . + +- Generate `compile_commands.json` by running a build command: + +`bear -- {{make}}` + +- Generate compilation database with a custom output file name: + +`bear --output {{path/to/compile_commands.json}} -- {{make}}` + +- Append results to an existing `compile_commands.json` file: + +`bear --append -- {{make}}` + +- Run in verbose mode to get detailed output: + +`bear --verbose -- {{make}}` + +- Force `bear` to use the preload method for command interception: + +`bear --force-preload -- {{make}}`