From 31e4c039d2c4e603a949eafd00ea0b2e72990814 Mon Sep 17 00:00:00 2001 From: Lucas Pingas <33041640+lpingas@users.noreply.github.com> Date: Mon, 1 Sep 2025 15:17:48 +0200 Subject: [PATCH] Add Bazel instructions to quick-start.md (#215) Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: ykiko --- docs/en/guide/quick-start.md | 6 +++++- docs/zh/guide/quick-start.md | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/en/guide/quick-start.md b/docs/en/guide/quick-start.md index 1e98d5a8..03886ffb 100644 --- a/docs/en/guide/quick-start.md +++ b/docs/en/guide/quick-start.md @@ -46,7 +46,11 @@ Note: This option only works when cmake's generator is set to makefile and ninja ### Bazel -TODO: +Bazel has no native support to generate a compilation database. The recommended solution is to use [bazel-compile-commands-extractor](https://github.com/hedronvision/bazel-compile-commands-extractor). After setting it up, you can generate `compile_commands.json` with: + +```bash +bazel run @hedron_compile_commands//:refresh_all +``` ### Visual Studio diff --git a/docs/zh/guide/quick-start.md b/docs/zh/guide/quick-start.md index 8d0009d8..22bbdb9f 100644 --- a/docs/zh/guide/quick-start.md +++ b/docs/zh/guide/quick-start.md @@ -47,7 +47,11 @@ cmake -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ### Bazel -TODO: +Bazel 不支持直接生成编译数据库,推荐使用 [bazel-compile-commands-extractor](https://github.com/hedronvision/bazel-compile-commands-extractor)。在安装好之后,你可以这样生成 `compile_commands.json`: + +```bash +bazel run @hedron_compile_commands//:refresh_all +``` ### Visual Studio