summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShifftC <[email protected]>2025-12-06 17:53:42 +0100
committerShifftC <[email protected]>2025-12-06 17:53:42 +0100
commit6921e40e00669f0f05a34ac9c802ba24abcb55b8 (patch)
treee7cd8c8da0b8de057ea667a10e2d1e74947dd499
parent1abc008be9c0be2d44c4ba76c2b4badf6ea40143 (diff)
compile_commands: prepare targets
-rw-r--r--xmake/plugins/project/clang/compile_commands.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/xmake/plugins/project/clang/compile_commands.lua b/xmake/plugins/project/clang/compile_commands.lua
index 9435819df..a017b4a32 100644
--- a/xmake/plugins/project/clang/compile_commands.lua
+++ b/xmake/plugins/project/clang/compile_commands.lua
@@ -308,6 +308,7 @@ function make(outputdir)
local oldir = os.cd(os.projectdir())
local jsonfile = io.open(path.join(outputdir, "compile_commands.json"), "w")
os.setenv("XMAKE_IN_COMPILE_COMMANDS_PROJECT_GENERATOR", "true")
+ target_cmds.prepare_targets()
_add_targets(jsonfile)
jsonfile:close()
os.setenv("XMAKE_IN_COMPILE_COMMANDS_PROJECT_GENERATOR", nil)