Skip to content
This repository has been archived by the owner on Jul 30, 2020. It is now read-only.

.cquery

Daan De Meyer edited this page Jul 28, 2018 · 1 revision

Another way is to create a file named .cquery located in the project root. cquery recursively finds source files and indexes them. .cquery can also exist in subdirectories which will affect the options in its subtree. Notice If you use emacs-cquery, read the document of cquery-project-root-matchers to locate the project root correctly.

If %clang is used, it expands to clang/clang++ according to the extension name. Prefix options with %c or %cpp to make it specific to C or C++.

Example .cquery:

%clang
%c -std=gnu11
%cpp -std=gnu++14
-pthread

# Includes
-I/work/cquery/third_party
-I/work/cquery/another_third_party
# -I space_is_not_allowed

Note: .cquery does not do word splitting or command substitution for you, you cannot use `command` or space-separated arguments like %cpp -std=gnu++14 -pthread