diff options
| author | ruki <[email protected]> | 2022-01-07 14:04:46 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-01-07 14:04:46 +0800 |
| commit | c326af03e11a22b94dd0288d8e40772537074bad (patch) | |
| tree | 9f601a152150ff7b1473eca3b01a21f9e2aab003 | |
| parent | 5ff975838378aa395751e719f647b2573ce4c834 (diff) | |
Update target.lua
| -rw-r--r-- | xmake/rules/pascal/build/target.lua | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/xmake/rules/pascal/build/target.lua b/xmake/rules/pascal/build/target.lua index 8d7662055..646474606 100644 --- a/xmake/rules/pascal/build/target.lua +++ b/xmake/rules/pascal/build/target.lua @@ -24,6 +24,7 @@ import("core.base.hashset") import("core.theme.theme") import("core.tool.compiler") import("core.project.depend") +import("utils.progress") -- build the source files function build_sourcefiles(target, sourcebatch, opt) @@ -31,9 +32,6 @@ function build_sourcefiles(target, sourcebatch, opt) -- is verbose? local verbose = option.get("verbose") - -- get progress range - local progress = assert(opt.progress, "no progress!") - -- get the target file local targetfile = target:targetfile() @@ -60,21 +58,13 @@ function build_sourcefiles(target, sourcebatch, opt) end -- trace progress into - cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", progress) - if verbose then - cprint("${dim color.build.target}linking.$(mode) %s", path.filename(targetfile)) - else - cprint("${color.build.target}linking.$(mode) %s", path.filename(targetfile)) - end + progress.show(opt.progress, "${color.build.target}linking.$(mode) %s", path.filename(targetfile)) -- trace verbose info if verbose then print(compinst:buildcmd(sourcefiles, targetfile, {target = target, compflags = compflags})) end - -- flush io buffer to update progress info - io.flush() - -- compile it dependinfo.files = {} assert(compinst:build(sourcefiles, targetfile, {target = target, dependinfo = dependinfo, compflags = compflags})) |
