Skip to content

Commit

Permalink
Add clangd to project
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoVen committed Jun 26, 2024
1 parent 47ece66 commit 99f08e2
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .clangd
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CompileFlags:
CompilationDatabase: "cmake"
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,5 @@ build

tests/coverage
tests/out

cmake
18 changes: 18 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
cmake_minimum_required(VERSION 3.8)

project(cmc)

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

file(GLOB_RECURSE sources
"./tests/main.c"
)

add_definitions(-DCMC_CALLBACKS)

add_executable(cmc ${sources})

target_include_directories(cmc PUBLIC
"./"
)

5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ docserve:
mdbook serve documentation

install_dev_deps:
sudo apt install gcc make valgrind lcov clang-format hyperfine
sudo apt install gcc make valgrind lcov clang-format hyperfine clangd cmake
cargo install mdbook

build_clangd:
cmake -S . -G "Unix Makefiles" -B cmake

.PHONY: tests tests_dev format bench docbuild docserve install_dev_deps

0 comments on commit 99f08e2

Please sign in to comment.