diff options
| author | ruki <[email protected]> | 2023-10-01 21:14:20 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-10-01 21:14:20 +0800 |
| commit | 4ea0573047db301f1569c9d6b0d117f92433db49 (patch) | |
| tree | f495cd7b7286c3d81f5a209515b662da4f0c5002 /xmake/plugins/project/vstudio/impl | |
| parent | 15e5f277191e8a088998d0f797dd1f44b5491e17 (diff) | |
| parent | 85a605758c47eaa92b0a22b028cc4896eceeaf3f (diff) | |
Merge pull request #4253 from A2va/orderkeys-sort-function
Sort keys by callback function
Diffstat (limited to 'xmake/plugins/project/vstudio/impl')
| -rw-r--r-- | xmake/plugins/project/vstudio/impl/vs201x.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/xmake/plugins/project/vstudio/impl/vs201x.lua b/xmake/plugins/project/vstudio/impl/vs201x.lua index e2389b8ba..3b6f145f4 100644 --- a/xmake/plugins/project/vstudio/impl/vs201x.lua +++ b/xmake/plugins/project/vstudio/impl/vs201x.lua @@ -213,7 +213,8 @@ function _make_custom_commands(target, vcxprojdir) local commands = {} _make_custom_commands_for_target(commands, target, vcxprojdir, "before") _make_custom_commands_for_target(commands, target, vcxprojdir) - for _, sourcebatch in table.orderpairs(target:sourcebatches()) do + local sourcebatches = target:sourcebatches() + for _, sourcebatch in table.orderpairs(sourcebatches) do local rulename = sourcebatch.rulename local sourcekind = sourcebatch.sourcekind if rulename ~= "c.build" and rulename ~= "c++.build" and rulename ~= "asm.build" and rulename ~= "cuda.build" and sourcekind ~= "mrc" then @@ -281,7 +282,8 @@ function _make_targetinfo(mode, arch, target, vcxprojdir) local firstcompflags = nil targetinfo.compflags = {} targetinfo.compargvs = {} - for _, sourcebatch in table.orderpairs(target:sourcebatches()) do + local sourcebatches = target:sourcebatches() + for _, sourcebatch in table.orderpairs(sourcebatches) do local sourcekind = sourcebatch.sourcekind local rulename = sourcebatch.rulename if sourcekind then |
