diff options
| author | ruki <[email protected]> | 2019-06-04 22:41:25 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-06-04 10:08:31 +0800 |
| commit | 18663d52e5ff484eea423f88cbf52cc10c5721f3 (patch) | |
| tree | 3e1e147713b4ca50276b676b9b346f52f893708b /xmake/modules/core/tools/nvcc.lua | |
| parent | 255d51be7e7ed10a13a4cd55b5aae55079ab4bb9 (diff) | |
improve string.split
Diffstat (limited to 'xmake/modules/core/tools/nvcc.lua')
| -rw-r--r-- | xmake/modules/core/tools/nvcc.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/modules/core/tools/nvcc.lua b/xmake/modules/core/tools/nvcc.lua index 066e86cc9..568c6aef9 100644 --- a/xmake/modules/core/tools/nvcc.lua +++ b/xmake/modules/core/tools/nvcc.lua @@ -309,7 +309,7 @@ function _compile1(self, sourcefile, objectfile, dependinfo, flags) os.tryrm(objectfile) -- find the start line of error - local lines = tostring(errors):split("\n") + local lines = tostring(errors):split("\n", {plain = true}) local start = 0 for index, line in ipairs(lines) do if line:find("error:", 1, true) or line:find("错误:", 1, true) then @@ -334,7 +334,7 @@ function _compile1(self, sourcefile, objectfile, dependinfo, flags) -- print some warnings if warnings and #warnings > 0 and (option.get("verbose") or option.get("warning")) then - cprint("${color.warning}%s", table.concat(table.slice(warnings:split('\n'), 1, 8), '\n')) + cprint("${color.warning}%s", table.concat(table.slice(warnings:split('\n', {plain = true}), 1, 8), '\n')) end -- generate the dependent includes |
