diff options
| author | ruki <[email protected]> | 2023-03-14 00:38:42 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-03-14 00:38:42 +0800 |
| commit | d068e8a4c4f54da17dc964b1329b0d98c4b59149 (patch) | |
| tree | 7ef9908b5faa6926e512db9dfd3e2d4da283e3ba /xmake/rules/plugin | |
| parent | 7df711288a8556f8d805a4a030c55a37fa1e647c (diff) | |
improve compile_commands extraconf
Diffstat (limited to 'xmake/rules/plugin')
| -rw-r--r-- | xmake/rules/plugin/compile_commands/xmake.lua | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/xmake/rules/plugin/compile_commands/xmake.lua b/xmake/rules/plugin/compile_commands/xmake.lua index 57514a768..9e44eb631 100644 --- a/xmake/rules/plugin/compile_commands/xmake.lua +++ b/xmake/rules/plugin/compile_commands/xmake.lua @@ -21,7 +21,7 @@ -- update compile_commandss.json automatically -- -- @code --- add_rules("plugin.compile_commands.autoupdate", {outputdir = ".vscode"}) +-- add_rules("plugin.compile_commands.autoupdate", {outputdir = ".vscode", lsp = "clangd"}) -- target("test") -- set_kind("binary") -- add_files("src/*.c") @@ -48,10 +48,8 @@ rule("plugin.compile_commands.autoupdate") for _, target in pairs(project.targets()) do table.join2(sourcefiles, target:sourcefiles(), target:headerfiles()) local extraconf = target:extraconf("rules", "plugin.compile_commands.autoupdate") - if extraconf and extraconf.outputdir then + if extraconf then outputdir = extraconf.outputdir - end - if extraconf and extraconf.lsp then lsp = extraconf.lsp end end |
