Skip to content

Commit a175942

Browse files
authored
Export "compile_commands.json" for clangd (#8)
1 parent f592fbd commit a175942

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Diff for: .gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -133,3 +133,6 @@ dmypy.json
133133

134134
# emacs
135135
*~
136+
137+
# clangd
138+
/compile_commands.json

Diff for: setup.py

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ def build_cmake(self, ext):
3232
f"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY={extdir.parent.absolute()}",
3333
f"-DCMAKE_BUILD_TYPE={config}",
3434
"-DCMAKE_VERBOSE_MAKEFILE=ON",
35+
"-DCMAKE_EXPORT_COMPILE_COMMANDS=1",
3536
"-G=Ninja",
3637
"-DLLVM_ENABLE_LLD=ON",
3738
f"-DCMAKE_PREFIX_PATH={os.getenv('CONDA_PREFIX')}/lib/cmake",

0 commit comments

Comments
 (0)