diff options
| author | ruki <[email protected]> | 2024-03-18 23:52:01 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2024-03-18 23:52:01 +0800 |
| commit | 8f40dc67f661f46de7a073ea079587faebf0f1af (patch) | |
| tree | 9a56acb9dac1c1b90c13fd34a8d59acf20a3150b /xmake/rules/c++/modules/modules_support/msvc | |
| parent | ca16db30058d8a512d73a7bee28e57f72de4c338 (diff) | |
use new progress
Diffstat (limited to 'xmake/rules/c++/modules/modules_support/msvc')
| -rw-r--r-- | xmake/rules/c++/modules/modules_support/msvc/builder.lua | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/xmake/rules/c++/modules/modules_support/msvc/builder.lua b/xmake/rules/c++/modules/modules_support/msvc/builder.lua index a46dae34a..5a67df409 100644 --- a/xmake/rules/c++/modules/modules_support/msvc/builder.lua +++ b/xmake/rules/c++/modules/modules_support/msvc/builder.lua @@ -267,7 +267,7 @@ function make_module_buildjobs(target, batchjobs, job_name, deps, opt) name = job_name, deps = table.join(target:name() .. "_populate_module_map", deps), sourcefile = opt.cppfile, - job = batchjobs:newjob(name or opt.cppfile, function(index, total) + job = batchjobs:newjob(name or opt.cppfile, function(index, total, jobopt) local mapped_bmi if provide and compiler_support.memcache():get2(target:name() .. name, "reuse") then @@ -316,18 +316,18 @@ function make_module_buildjobs(target, batchjobs, job_name, deps, opt) local bmifile = mapped_bmi or bmifile if target:is_binary() then if mapped_bmi then - progress.show((index * 100) / total, "${color.build.target}<%s> ${clear}${color.build.object}compiling.objectfile.$(mode) %s", target:name(), name or opt.cppfile) + progress.show(jobopt.progress, "${color.build.target}<%s> ${clear}${color.build.object}compiling.objectfile.$(mode) %s", target:name(), name or opt.cppfile) _compile_objectfile_step(target, bmifile, opt.cppfile, opt.objectfile, provide) else - progress.show((index * 100) / total, "${color.build.target}<%s> ${clear}${color.build.object}compiling.module.$(mode) %s", target:name(), name or opt.cppfile) + progress.show(jobopt.progress, "${color.build.target}<%s> ${clear}${color.build.object}compiling.module.$(mode) %s", target:name(), name or opt.cppfile) _compile_one_step(target, bmifile, opt.cppfile, opt.objectfile, provide) end else if (not public and not external) or (external and private_dep) then - progress.show((index * 100) / total, "${color.build.target}<%s> ${clear}${color.build.object}compiling.module.$(mode) %s", target:name(), name or opt.cppfile) + progress.show(jobopt.progress, "${color.build.target}<%s> ${clear}${color.build.object}compiling.module.$(mode) %s", target:name(), name or opt.cppfile) _compile_one_step(target, bmifile, opt.cppfile, opt.objectfile, provide) else - progress.show((index * 100) / total, "${color.build.target}<%s> ${clear}${color.build.object}compiling.bmi.$(mode) %s", target:name(), name or opt.cppfile) + progress.show(jobopt.progress, "${color.build.target}<%s> ${clear}${color.build.object}compiling.bmi.$(mode) %s", target:name(), name or opt.cppfile) _compile_bmi_step(target, bmifile, opt.cppfile, opt.objectfile, provide) end end @@ -416,7 +416,7 @@ function make_headerunit_buildjobs(target, job_name, batchjobs, headerunit, bmif return { name = job_name, sourcefile = headerunit.path, - job = batchjobs:newjob(job_name, function(index, total) + job = batchjobs:newjob(job_name, function(index, total, jobopt) if not os.isdir(outputdir) then os.mkdir(outputdir) end @@ -432,7 +432,7 @@ function make_headerunit_buildjobs(target, job_name, batchjobs, headerunit, bmif local name = headerunit.unique and headerunit.name or headerunit.path if opt.build then - progress.show((index * 100) / total, "${color.build.target}<%s> ${clear}${color.build.object}compiling.headerunit.$(mode) %s", target:name(), headerunit.name) + progress.show(jobopt.progress, "${color.build.target}<%s> ${clear}${color.build.object}compiling.headerunit.$(mode) %s", target:name(), headerunit.name) _compile(target, _make_headerunitflags(target, headerunit, bmifile), name, target:objectfile(headerunit.path), true) end |
