Skip to content

Commit

Permalink
Turn on EXPORT_COMPILE_COMMANDS
Browse files Browse the repository at this point in the history
To make `clangd` work properly, one may need to make symbolic links

```
cd daemon
ln -sf $PWD/build/tools/debug/arm64-v8a/compile_commands.json build
```
  • Loading branch information
JingMatrix committed May 19, 2024
1 parent 1f80050 commit 7c3fe84
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.project
.settings
.cache
*.iml
.gradle
/local.properties
Expand Down
4 changes: 3 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ cmaker {
arrayOf(
"-DEXTERNAL_ROOT=${File(rootDir.absolutePath, "external")}",
"-DCORE_ROOT=${File(rootDir.absolutePath, "core/src/main/jni")}",
"-DANDROID_STL=none"
"-DANDROID_STL=none",
"-DCMAKE_EXPORT_COMPILE_COMMANDS=ON",
)
)
val flags = arrayOf(
Expand Down Expand Up @@ -88,6 +89,7 @@ subprojects {
externalNativeBuild {
cmake {
version = "3.28.1+"
buildStagingDirectory = layout.buildDirectory.get().asFile
}
}

Expand Down

0 comments on commit 7c3fe84

Please sign in to comment.