From 2166cd042494ecd3ffbad05a43aa336cb04ffd0e Mon Sep 17 00:00:00 2001 From: ruki Date: Sun, 26 Dec 2021 21:10:22 +0800 Subject: Update target.lua --- xmake/plugins/show/info/target.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/xmake/plugins/show/info/target.lua b/xmake/plugins/show/info/target.lua index fb99b31e4..7d86329ef 100644 --- a/xmake/plugins/show/info/target.lua +++ b/xmake/plugins/show/info/target.lua @@ -72,8 +72,12 @@ function main(name) cprint(" ${color.dump.string}sourcebatch${clear}(%s): with rule(%s)", sourcebatch.sourcekind, sourcebatch.rulename) for idx, sourcefile in ipairs(sourcebatch.sourcefiles) do cprint(" -> %s", sourcefile) - cprint(" ${dim}-> %s", sourcebatch.objectfiles[idx]) - cprint(" ${dim}-> %s", sourcebatch.dependfiles[idx]) + if sourcebatch.objectfiles then + cprint(" ${dim}-> %s", sourcebatch.objectfiles[idx]) + end + if sourcebatch.dependfiles then + cprint(" ${dim}-> %s", sourcebatch.dependfiles[idx]) + end end end end -- cgit v1.3.1