summaryrefslogtreecommitdiff
path: root/xmake/modules
diff options
context:
space:
mode:
authorruki <[email protected]>2019-06-12 22:33:22 +0800
committerruki <[email protected]>2019-06-12 09:20:15 +0800
commit17332ad1070bb6190bcd24f0a96cca823b4d8d26 (patch)
tree532680082206049d3c22d74025052cb705a37c86 /xmake/modules
parentafac15c89d291e7f5855f4fec4b2ed3ca816b8a4 (diff)
improve string.rtrim and cl output
Diffstat (limited to 'xmake/modules')
-rw-r--r--xmake/modules/core/tools/cl.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/xmake/modules/core/tools/cl.lua b/xmake/modules/core/tools/cl.lua
index 4f3545988..480d32a03 100644
--- a/xmake/modules/core/tools/cl.lua
+++ b/xmake/modules/core/tools/cl.lua
@@ -410,7 +410,8 @@ function _compile1(self, sourcefile, objectfile, dependinfo, flags)
-- filter includes notes: "Note: including file: xxx.h", @note maybe not english language
local results = ""
- for _, line in ipairs(tostring(errors):split("\r\n", {plain = true})) do
+ for _, line in ipairs(tostring(errors):split("\n", {plain = true})) do
+ line = line:rtrim()
if not _include_note(self, line) then
results = results .. line .. "\r\n"
end
@@ -430,7 +431,8 @@ function _compile1(self, sourcefile, objectfile, dependinfo, flags)
end
if #output:trim() > 0 then
local lines = {}
- for _, line in ipairs(output:split("\r\n", {plain = true})) do
+ for _, line in ipairs(output:split("\n", {plain = true})) do
+ line = line:rtrim()
if line:match("warning %a+[0-9]+%s*:") then
table.insert(lines, line)
end