From c8280cb8c4e00d0c0973d245726b1c31ed18cd25 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Fri, 6 Oct 2023 17:05:08 -0400 Subject: [PATCH] document compile_commands.json symlink + .gitignore --- .gitignore | 2 ++ README.md | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 6637741..eff45bd 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ .cache # typical cmake build directory (source-tree-nephew) build*/* +# symlink to builddir/compile_commands.json; should be set manually in dev sandbox +compile_commands.json diff --git a/README.md b/README.md index 0cd50f0..3c5d34b 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ $ cd reflect $ mkdir build $ cd build +$ INSTALL_PREFIX=/usr/local # or wherever you prefer $ cmake -DCMAKE_MODULE_PATH=${INSTALL_PREFIX}/share/cmake -DCMAKE_PREFIX_PATH=${INSTALL_PREFIX} -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} .. $ make $ make install @@ -12,8 +13,14 @@ $ make install ### build for unit test coverage ``` -$ cd refcnt +$ cd xo-reflect $ mkdir build-ccov $ cd build-ccov $ cmake -DCMAKE_MODULE_PATH=${INSTALL_PREFIX}/share/cmake -DCMAKE_PREFIX_PATH=${INSTALL_PREFIX} -DCODE_COVERAGE=ON -DCMAKE_BUILD_TYPE=Debug .. ``` + +### LSP support +``` +$ cd xo-reflect +$ ln -s build/compile_commands.json # lsp will look for compile_commands.json in the root of the source tree +```