From 75774e24bfed564d977225876c0385900cdc5cdd Mon Sep 17 00:00:00 2001 From: Jacob Dufault Date: Fri, 17 Nov 2017 07:52:30 -0800 Subject: [PATCH] Update README --- README.md | 34 ++++------------------------------ 1 file changed, 4 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index 4966222b..aee035d8 100644 --- a/README.md +++ b/README.md @@ -63,35 +63,9 @@ still being developed. If you run into issues, you can view debug output by running the (`F1`) `View: Toggle Output` command and opening the `cquery` output section. -## Project setup (system includes, clang configuration) +## Project setup -### Part 1: System includes - -cquery will likely fail to resolve system includes like `stddef.h` or -`` unless the include path is updated to point to them. Add the -system include paths to `cquery.index.extraClangArguments`. For example, - -```js -{ - // ... - "cquery.index.extraClangArguments": [ - // Generated by running the following in a Chrome checkout: - // $ ./third_party/llvm-build/Release+Asserts/bin/clang++ -v ash/debug.cc - "-isystem/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8", - "-isystem/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/x86_64-linux-gnu/c++/4.8", - "-isystem/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/backward", - "-isystem/usr/local/include", - "-isystem/PATH/TO/CHROME/src/third_party/llvm-build/Release+Asserts/lib/clang/5.0.0/include", - "-isystem/usr/include/x86_64-linux-gnu", - "-isystem/usr/include", - ], - // ... -} -``` - -### Part 2: Clang configuration - -#### compile_commands.json (Best) +### compile_commands.json (Best) To get the most accurate index possible, you can give cquery a compilation database emitted from your build system of choice. For example, here's how to @@ -103,13 +77,13 @@ $ ninja -C out/Release -t compdb cxx cc > compile_commands.json The `compile_commands.json` file should be in the top-level workspace directory. -#### cquery.index.extraClangArguments +### cquery.index.extraClangArguments If for whatever reason you cannot generate a `compile_commands.json` file, you can add the flags to the `cquery.index.extraClangArguments` configuration option. -#### clang_args +### clang_args If for whatever reason you cannot generate a `compile_commands.json` file, you can add the flags to a file called `clang_args` located in the top-level