diff options
-rw-r--r-- | .vscode/vs-code-template.code-workspace.in | 3 | ||||
-rwxr-xr-x | bin/gbuild-to-ide | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/.vscode/vs-code-template.code-workspace.in b/.vscode/vs-code-template.code-workspace.in index f6078155e8dc..87a6a27ac865 100644 --- a/.vscode/vs-code-template.code-workspace.in +++ b/.vscode/vs-code-template.code-workspace.in @@ -35,8 +35,7 @@ "files.associations": { "*.patch.[0-9]": "diff" }, - // FIXME: arguably the generator should place it in the builddir, not srcdir - "C_Cpp.default.compileCommands": "${workspaceFolder:srcdir}/compile_commands.json", + "C_Cpp.default.compileCommands": "@BUILDDIR@/compile_commands.json", // only used if the file doesn't match anything in the compile_commands.json - aka externals // libxml includes just added as example/for reference "C_Cpp.default.includePath": [ diff --git a/bin/gbuild-to-ide b/bin/gbuild-to-ide index 26f0c87f6855..b56cff8585ea 100755 --- a/bin/gbuild-to-ide +++ b/bin/gbuild-to-ide @@ -549,7 +549,7 @@ class VimIntegrationGenerator(IdeIntegrationGenerator): entry = {'directory': lib.location, 'file': filePath, 'command': self.generateCommand(lib, filePath)} entries.append(entry) global_list.extend(entries) - with open('compile_commands.json', 'w') as export_file: + with open(os.path.join(self.gbuildparser.builddir, 'compile_commands.json'), 'w') as export_file: json.dump(global_list, export_file) def generateCommand(self, lib, file): |