diff options
| author | Arthur LAURENT <[email protected]> | 2022-08-05 05:34:45 +0200 |
|---|---|---|
| committer | Arthur LAURENT <[email protected]> | 2022-08-05 05:34:45 +0200 |
| commit | 913fecaf3b83198105cd56d10156b1adbc901a7e (patch) | |
| tree | 0569d487ccb7e39386976dce0dd7f6ad4224412e | |
| parent | 279689863b3ced10d7d1639b77ec57c70db11fde (diff) | |
Use table.insert instead of table.append
| -rw-r--r-- | xmake/rules/c++/modules/modules_support/clang.lua | 6 | ||||
| -rw-r--r-- | xmake/rules/c++/modules/modules_support/gcc.lua | 6 | ||||
| -rw-r--r-- | xmake/rules/c++/modules/modules_support/msvc.lua | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/xmake/rules/c++/modules/modules_support/clang.lua b/xmake/rules/c++/modules/modules_support/clang.lua index c91decb97..90d74b654 100644 --- a/xmake/rules/c++/modules/modules_support/clang.lua +++ b/xmake/rules/c++/modules/modules_support/clang.lua @@ -152,7 +152,7 @@ function generate_stl_headerunits(target, batchcmds, headerunits, opt) end table.insert(flags, modulefileflag .. bmifile) - table.append(bmifiles, bmifile) + table.insert(bmifiles, bmifile) depmtime = math.max(depmtime, os.mtime(bmifile)) end batchcmds:set_depmtime(depmtime) @@ -208,7 +208,7 @@ function generate_user_headerunits(target, batchcmds, headerunits, opt) batchcmds:add_depfiles(headerunit.path) table.insert(flags, modulefileflag .. bmifile) - table.append(bmifiles, bmifile) + table.insert(bmifiles, bmifile) depmtime = math.max(depmtime, os.mtime(bmifile)) end batchcmds:set_depmtime(depmtime) @@ -253,7 +253,7 @@ function build_modules(target, batchcmds, objectfiles, modules, opt) local bmifile = provide.bmi table.join2(args, { "-c", "-x", "c++-module", "--precompile", provide.sourcefile, "-o", bmifile }) - table.append(bmifiles_, bmifile) + table.insert(bmifiles_, bmifile) batchcmds:add_depfiles(provide.sourcefile) diff --git a/xmake/rules/c++/modules/modules_support/gcc.lua b/xmake/rules/c++/modules/modules_support/gcc.lua index c23ced122..700e92210 100644 --- a/xmake/rules/c++/modules/modules_support/gcc.lua +++ b/xmake/rules/c++/modules/modules_support/gcc.lua @@ -169,7 +169,7 @@ function generate_stl_headerunits(target, batchcmds, headerunits, opt) batchcmds:show_progress(opt.progress, "${color.build.object}generating.cxx.headerunit.bmi %s", headerunit.name) batchcmds:vrunv(compinst:program(), table.join(compinst:compflags({target = target}), args)) end - table.append(bmifiles, bmifile) + table.insert(bmifiles, bmifile) depmtime = math.max(depmtime, os.mtime(bmifile)) end batchcmds:set_depmtime(depmtime) @@ -221,7 +221,7 @@ function generate_user_headerunits(target, batchcmds, headerunits, opt) batchcmds:add_depfiles(headerunit.path) end - table.append(bmifiles, bmifile) + table.insert(bmifiles, bmifile) depmtime = math.max(depmtime, os.mtime(bmifile)) end batchcmds:set_depmtime(depmtime) @@ -256,7 +256,7 @@ function build_modules(target, batchcmds, objectfiles, modules, opt) batchcmds:add_depfiles(provide.sourcefile) end - table.append(bmifiles, bmifile) + table.insert(bmifiles, bmifile) depmtime = math.max(depmtime, os.mtime(bmifile)) end diff --git a/xmake/rules/c++/modules/modules_support/msvc.lua b/xmake/rules/c++/modules/modules_support/msvc.lua index 89cc35f6b..22dc4485f 100644 --- a/xmake/rules/c++/modules/modules_support/msvc.lua +++ b/xmake/rules/c++/modules/modules_support/msvc.lua @@ -142,7 +142,7 @@ function generate_stl_headerunits(target, batchcmds, headerunits, opt) local flag = {headerunitflag .. ":angle", headerunit.name .. "=" .. headerunit.name .. get_bmi_extension()} table.join2(flags, flag) - table.append(bmifiles, bmifile) + table.insert(bmifiles, bmifile) depmtime = math.max(depmtime, os.mtime(bmifile)) end batchcmds:set_depmtime(depmtime) @@ -199,7 +199,7 @@ function generate_user_headerunits(target, batchcmds, headerunits, opt) table.join2(flags, flag) target:add("objectfiles", objectfile) - table.append(bmifiles, bmifile) + table.insert(bmifiles, bmifile) depmtime = math.max(depmtime, os.mtime(bmifile)) end batchcmds:set_depmtime(depmtime) @@ -248,7 +248,7 @@ function build_modules(target, batchcmds, objectfiles, modules, opt) batchcmds:add_depfiles(provide.sourcefile) table.join2(bmiflags, {referenceflag, name .. "=" .. path.filename(bmifile)}) - table.append(bmifiles, bmifile) + table.insert(bmifiles, bmifile) depmtime = math.max(depmtime, os.mtime(bmifile)) end |
