This is an automated email from the ASF dual-hosted git repository.
wwbmmm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brpc.git
The following commit(s) were added to refs/heads/master by this push:
new 0b990a06 Reuse standard CMake build directory in docs (#3552)
0b990a06 is described below
commit 0b990a067becd3a7e7dff2a795daa614c902a3e7
Author: hesphoros <[email protected]>
AuthorDate: Sat Sep 19 10:56:35 2026 +0800
Reuse standard CMake build directory in docs (#3552)
---
.gitignore | 1 -
docs/cn/getting_started.md | 8 ++++----
docs/en/getting_started.md | 8 ++++----
3 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/.gitignore b/.gitignore
index a534de93..739963a2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -37,7 +37,6 @@ CTestTestfile.cmake
/CPackSourceConfig.cmake
/CPackConfig.cmake
/cmake-build-debug/
-/build-debug/
/googletest-download/
/googletest-src/
/test/rpc_data/
diff --git a/docs/cn/getting_started.md b/docs/cn/getting_started.md
index 80d8cb52..b8fdb536 100644
--- a/docs/cn/getting_started.md
+++ b/docs/cn/getting_started.md
@@ -288,19 +288,19 @@ Monterey中openssl的安装位置可能不再位于`/usr/local/opt/openssl`,
Apple Silicon 可以使用 Homebrew 安装的依赖编译 Debug 版本:
```shell
-cmake -S . -B build-debug -G "Unix Makefiles" \
+cmake -S . -B build -G "Unix Makefiles" \
-DCMAKE_BUILD_TYPE=Debug \
-DDEBUG=ON \
-DCMAKE_OSX_ARCHITECTURES=arm64 \
-DCMAKE_OSX_SYSROOT="$(xcrun --sdk macosx --show-sdk-path)" \
-DCMAKE_PREFIX_PATH="$(brew --prefix)" \
-DOPENSSL_ROOT_DIR="$(brew --prefix openssl@3)"
-cmake --build build-debug --parallel
+cmake --build build --parallel
```
该命令使用单配置的Unix Makefiles生成器,因此`CMAKE_BUILD_TYPE=Debug`会选择
CMake的Debug构建配置。`DEBUG=ON`启用brpc的调试日志并保留断言。构建产物位于
-`build-debug/output/`。
+`build/output/`。
如需为 clangd 等工具生成编译数据库,请在配置命令中添加以下可选项:
@@ -308,7 +308,7 @@ CMake的Debug构建配置。`DEBUG=ON`启用brpc的调试日志并保留断言
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
```
-生成的编译数据库位于 `build-debug/compile_commands.json`。
+生成的编译数据库位于 `build/compile_commands.json`。
如果 CMake 报错 `tapi error: malformed file`,请确认 Command Line Tools 与 Xcode
版本一致,并选择当前安装的 Xcode:
diff --git a/docs/en/getting_started.md b/docs/en/getting_started.md
index 19957751..d605975e 100644
--- a/docs/en/getting_started.md
+++ b/docs/en/getting_started.md
@@ -296,20 +296,20 @@ openssl installed in Monterey may not be found at
`/usr/local/opt/openssl`, inst
Apple Silicon can build the Debug configuration against dependencies installed
by Homebrew:
```shell
-cmake -S . -B build-debug -G "Unix Makefiles" \
+cmake -S . -B build -G "Unix Makefiles" \
-DCMAKE_BUILD_TYPE=Debug \
-DDEBUG=ON \
-DCMAKE_OSX_ARCHITECTURES=arm64 \
-DCMAKE_OSX_SYSROOT="$(xcrun --sdk macosx --show-sdk-path)" \
-DCMAKE_PREFIX_PATH="$(brew --prefix)" \
-DOPENSSL_ROOT_DIR="$(brew --prefix openssl@3)"
-cmake --build build-debug --parallel
+cmake --build build --parallel
```
The command uses the single-config Unix Makefiles generator, so
`CMAKE_BUILD_TYPE=Debug` selects CMake's Debug configuration. `DEBUG=ON`
enables brpc's debug logs and keeps assertions enabled. Build artifacts are
-written to `build-debug/output/`.
+written to `build/output/`.
To generate a compilation database for tools such as clangd, add the following
optional argument to the configuration command:
@@ -318,7 +318,7 @@ optional argument to the configuration command:
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
```
-The compilation database is generated at `build-debug/compile_commands.json`.
+The compilation database is generated at `build/compile_commands.json`.
If CMake reports `tapi error: malformed file`, make sure the Command Line Tools
and Xcode versions match, then select the installed Xcode:
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]