summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2020-10-06 00:59:09 +0800
committerruki <[email protected]>2020-10-06 00:59:09 +0800
commitc54f892c787d2f07011a1aa079c74d87ccef7006 (patch)
tree2055cecb4f6b7ef625607148e811090c17723a49
parentc73161f573ea50e24494114166d5ae6d25e56196 (diff)
improve run action
-rw-r--r--xmake/actions/run/main.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/actions/run/main.lua b/xmake/actions/run/main.lua
index c77c71546..17deae07a 100644
--- a/xmake/actions/run/main.lua
+++ b/xmake/actions/run/main.lua
@@ -160,7 +160,7 @@ function _check_targets(targetname)
table.insert(targets, project.target(targetname))
else
-- install default or all targets
- for _, target in pairs(project.targets()) do
+ for _, target in ipairs(project.ordertargets()) do
local default = target:get("default")
if (default == nil or default == true or option.get("all")) and target:targetkind() == "binary" then
table.insert(targets, target)
@@ -208,7 +208,7 @@ function main()
_run(project.target(targetname))
else
-- run default or all binary targets
- for _, target in pairs(project.targets()) do
+ for _, target in ipairs(project.ordertargets()) do
local default = target:get("default")
if (default == nil or default == true or option.get("all")) and target:targetkind() == "binary" then
_run(target)