diff options
| author | ruki <[email protected]> | 2016-07-14 09:18:37 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2016-07-14 09:18:37 +0800 |
| commit | 6c2d3f0ea4d0ccdb10199bc9462b0dc44ddc8a9a (patch) | |
| tree | 268de1524680eafc5846ecd731eda7b454b05197 /xmake/actions/build/kinds/binary.lua | |
| parent | e20c540cbde1694c683bbc3b8c19158bbde57985 (diff) | |
add colors for verbose info
Diffstat (limited to 'xmake/actions/build/kinds/binary.lua')
| -rwxr-xr-x | xmake/actions/build/kinds/binary.lua | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/xmake/actions/build/kinds/binary.lua b/xmake/actions/build/kinds/binary.lua index 0b3c777ef..c3aafcb55 100755 --- a/xmake/actions/build/kinds/binary.lua +++ b/xmake/actions/build/kinds/binary.lua @@ -47,8 +47,16 @@ function build(target, g) -- the target file local targetfile = target:targetfile() - -- trace - print("[%02d%%]: linking.$(mode) %s", (g.targetindex + 1) * 100 / g.targetcount, path.filename(targetfile)) + -- is verbose? + local verbose = option.get("verbose") + + -- trace percent into + cprintf("${yellow}[%02d%%]:${clear} ", (g.targetindex + 1) * 100 / g.targetcount) + if verbose then + cprint("${dim}linking.$(mode) %s", path.filename(targetfile)) + else + print("linking.$(mode) %s", path.filename(targetfile)) + end -- trace verbose info if option.get("verbose") then |
