Add support for generating compile_commands.json

- Integrate premake-ecc module for generating compile_commands.json
- Add .clangd config pointing to build/ directory
- Add 'Generate compile_commands.json' task
- Run compile_commands generation automatically on build
This commit is contained in:
Peter0x44
2025-12-03 05:16:23 +00:00
parent acc91fd5a8
commit a6c1b96d0a
8 changed files with 268 additions and 1 deletions

25
.vscode/tasks.json vendored
View File

@@ -95,7 +95,30 @@
"osx": {
"command": "premake5.osx"
},
"group": "build"
"group": "build",
"dependsOn": ["Generate compile_commands.json"]
},
{
"label": "Generate compile_commands.json",
"type": "process",
"command": "./premake5",
"options": {
"cwd": "${workspaceFolder}/build/"
},
"args": [
"ecc"
],
"windows": {
"command": "./premake5.exe"
},
"linux": {
"command": "./premake5"
},
"osx": {
"command": "premake5.osx"
},
"group": "build",
"problemMatcher": []
}
]
}