Skip to content

Commit

Permalink
Export compile_commands.json to enable clangd support (#1753)
Browse files Browse the repository at this point in the history
  • Loading branch information
tgymnich authored Feb 26, 2024
1 parent 9884107 commit 26c4337
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// available ubuntu versions: [20, 22]
// available llvm versions: [9, 10, 11, 12, 13, 14, 15]
// available llvm versions: [11, 12, 13, 14, 15, 16, 17, 18]
{
"name": "Enzyme",
"image": "ghcr.io/enzymead/enzyme-dev-docker/ubuntu-22-llvm-16:latest",
Expand All @@ -14,7 +14,9 @@
"customizations": {
"vscode": {
"extensions": [
"ms-vscode.cpptools-extension-pack"
"llvm-vs-code-extensions.vscode-clangd",
"BazelBuild.vscode-bazel",
"twxs.cmake"
]
}
}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ enzyme/benchmarks/ReverseMode/*/*.o
enzyme/benchmarks/ReverseMode/*/*.exe
enzyme/benchmarks/ReverseMode/*/results.txt
enzyme/benchmarks/ReverseMode/*/results.json
.cache
1 change: 1 addition & 0 deletions enzyme/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ add_definitions(-DENZYME_VERSION_MAJOR=${ENZYME_MAJOR_VERSION})
add_definitions(-DENZYME_VERSION_MINOR=${ENZYME_MINOR_VERSION})
add_definitions(-DENZYME_VERSION_PATCH=${ENZYME_PATCH_VERSION})

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
SET(CMAKE_CXX_FLAGS "-Wall -fno-rtti ${CMAKE_CXX_FLAGS} -Werror=unused-variable -Werror=dangling-else -Werror=unused-but-set-variable -Werror=return-type -Werror=nonnull")
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -ggdb")
Expand Down

0 comments on commit 26c4337

Please sign in to comment.