Skip to content

Commit

Permalink
Make: support generating clangd DB
Browse files Browse the repository at this point in the history
  • Loading branch information
athre0z committed Feb 4, 2024
1 parent 4a151f8 commit 61d5f5b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ __pycache__
/doc
/cmake-build-debug
/amalgamated-dist

.cache
compile_commands.json
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: build configure install amalgamate clean test doc doc-plain doc-themed
.PHONY: build configure install amalgamate clean test doc doc-plain doc-themed clangd

BUILD_DIR ?= build
CSS_DIR ?= ../doxygen-awesome-css
Expand Down Expand Up @@ -29,6 +29,11 @@ test: build
doc: configure
cmake --build $(BUILD_DIR) --target ZydisDoc

clangd:
CC=clang cmake -B $(BUILD_DIR)-clangd -DCMAKE_EXPORT_COMPILE_COMMANDS=1; \
cmake --build $(BUILD_DIR)-clangd -j && \
mv $(BUILD_DIR)-clangd/compile_commands.json .

dependencies/zycore/CMakeLists.txt:
@if ! command -v git > /dev/null; then \
echo >&2 -n "ERROR: git is not installed. Please either manually place all"; \
Expand Down

0 comments on commit 61d5f5b

Please sign in to comment.