summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2021-12-26 21:10:22 +0800
committerGitHub <[email protected]>2021-12-26 21:10:22 +0800
commit2166cd042494ecd3ffbad05a43aa336cb04ffd0e (patch)
tree40c707e8a5872a2ae20657d81fd238a7e6ef5ef5
parent6ab8485ac0e8bf702cc15a278085e8e1b7e6f6a7 (diff)
Update target.lua
-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