diff options
| author | Arthur LAURENT <[email protected]> | 2025-05-12 03:49:31 +0200 |
|---|---|---|
| committer | Arthur LAURENT <[email protected]> | 2025-05-12 04:54:34 +0200 |
| commit | 3ba28a72239a8d23d13cd577437e871eaebc155a (patch) | |
| tree | 90dc74db7eda9955797d24bd19ad19e55997e237 /xmake/rules/c++/modules/builder.lua | |
| parent | 406aa7ca454fad3ef8872070cbac6efdd7d440e7 (diff) | |
(C++ modules support) normalize module progress format with regular C++
Diffstat (limited to 'xmake/rules/c++/modules/builder.lua')
| -rw-r--r-- | xmake/rules/c++/modules/builder.lua | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/xmake/rules/c++/modules/builder.lua b/xmake/rules/c++/modules/builder.lua index 9a5a4b37e..44da4d622 100644 --- a/xmake/rules/c++/modules/builder.lua +++ b/xmake/rules/c++/modules/builder.lua @@ -594,6 +594,36 @@ function is_dependencies_changed(target, module) return requires, changed end +function show_progress(target, module, opt) + local show = function(...) + local batchcmds = opt and opt.batchcmds + if batchcmds then + batchcmds:show_progress(opt.progress, ...) + else + progress.show(opt.progress, ...) + end + end + local suffix = opt.suffix or "" + local cmd = opt.cmd or "" + local dim = "" + if option.get("verbose") then + dim = "${dim}" + end + local header = "${clear}${color.build.target}<%s>${clear}" .. dim + if opt.headerunit then + local name = module.method == "include-angle" and ("<" .. path.filename(module.name) .. ">") or module.name + show(header .. " compiling.headerunit.$(mode) %s${clear}%s" .. suffix, target:fullname(), name, cmd) + elseif opt.bmi then + if opt.objectfile then + show(header .. " compiling.module.$(mode) %s${clear}%s" .. suffix, target:fullname(), module.name, cmd) + else + show(header .. " compiling.module.bmi.$(mode) %s${clear}%s" .. suffix, target:fullname(), module.name, cmd) + end + else + show("compiling.$(mode) %s${clear}%s" .. suffix, module.sourcefile, cmd) + end +end + function clean(target) -- we cannot use target:data("cxx.has_modules"), -- because on_config will be not called when cleaning targets |
