From 2c3e586122dfeae9a18c3d7de3e318ed1746462a Mon Sep 17 00:00:00 2001 From: black-desk Date: Tue, 5 Mar 2024 23:34:56 +0800 Subject: [PATCH] docs: update BUILD.md to use ccache and ninja Signed-off-by: black-desk --- BUILD.md | 8 ++++++++ BUILD.zh_CN.md | 2 ++ 2 files changed, 10 insertions(+) diff --git a/BUILD.md b/BUILD.md index 47ea8ce08..45f8ff708 100644 --- a/BUILD.md +++ b/BUILD.md @@ -10,6 +10,14 @@ sudo cmake --install build-release For developing or debugging linglong: ```bash + +# Use ccache and ninja if available. +# You might want add this to the rc file of your shell. +export CMAKE_CXX_COMPILER_LAUNCHER=="$(command -v ccache 2>/dev/null)" +if command -v ninja &>/dev/null; then + export CMAKE_GENERATOR="Ninja" +fi + # configure, build and test cmake --workflow --preset debug diff --git a/BUILD.zh_CN.md b/BUILD.zh_CN.md index 4ccd993e6..171dec803 100644 --- a/BUILD.zh_CN.md +++ b/BUILD.zh_CN.md @@ -10,6 +10,8 @@ sudo cmake --install build-release 如果你想开发或调试玲珑: ```bash +export CMAKE_CXX_COMPILIER_LAUNCHER="$(command -v ccache)" + # 配置,构建然后运行测试 cmake --workflow --preset debug