diff options
| author | ruki <[email protected]> | 2022-09-28 22:38:12 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-09-28 22:38:12 +0800 |
| commit | 39237af067f83918549427b27e95b0f479984e47 (patch) | |
| tree | 20425568e4713f46df16f77a75e0d1091e344873 /xmake/core/project/project.lua | |
| parent | 4a67a67c0535f465dec6d1054579d3960ed057bf (diff) | |
fix rule
Diffstat (limited to 'xmake/core/project/project.lua')
| -rw-r--r-- | xmake/core/project/project.lua | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/xmake/core/project/project.lua b/xmake/core/project/project.lua index 2c18a6c95..40ae3a74f 100644 --- a/xmake/core/project/project.lua +++ b/xmake/core/project/project.lua @@ -864,7 +864,7 @@ function project.target(name) return targets and targets[name] end --- add the given target +-- add the given target, @note if the target name is the same, it will be replaced function project.target_add(t) local targets = project.targets() if targets then @@ -893,16 +893,9 @@ function project.ordertargets() if not ordertargets then local targets = project.targets() ordertargets = {} - local targets_unique = {} + local targetrefs = {} for _, t in pairs(targets) do - for _, dep in ipairs(t:orderdeps()) do - local name = dep:name() - if not targets_unique[name] then - targets_unique[name] = dep - table.insert(ordertargets, dep) - end - end - table.insert(ordertargets, t) + instance_deps.sort_deps(targets, ordertargets, targetrefs, t) end project._memcache():set("ordertargets", ordertargets) end |
