未验证 提交 76221e46 编写于 作者: X xzhangxian1008 提交者: GitHub

Add clangd config file (#249)

### What problem were solved in this pull request?
Problem:
clangd default finds `compile_commands.json` in `build` directory and
the miniob's default building directory is not `build` which will lead
to the clangd's failure of searching `compile_commands.json`.

### What is changed and how it works?

create a soft link from build to build_xxx in build.sh when building.
上级 2fedf8b4
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
build/* build/*
build_* build_*
cmake-build-*/* cmake-build-*/*
build
.cache/*
.DS_Store .DS_Store
.idea .idea
.ccls-cache .ccls-cache
......
...@@ -114,7 +114,11 @@ function do_init ...@@ -114,7 +114,11 @@ function do_init
function prepare_build_dir function prepare_build_dir
{ {
TYPE=$1 TYPE=$1
mkdir -p ${TOPDIR}/build_${TYPE} && cd ${TOPDIR}/build_${TYPE} mkdir -p ${TOPDIR}/build_${TYPE}
rm -f build
echo "create soft link for build_${TYPE}, linked by directory named build"
ln -s build_${TYPE} build
cd ${TOPDIR}/build_${TYPE}
} }
function do_build function do_build
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册