summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/plugins/show/info/target.lua8
1 files 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