diff options
Diffstat (limited to 'xmake/modules')
| -rw-r--r-- | xmake/modules/core/tools/nvcc.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/xmake/modules/core/tools/nvcc.lua b/xmake/modules/core/tools/nvcc.lua index 2aad54096..471d62532 100644 --- a/xmake/modules/core/tools/nvcc.lua +++ b/xmake/modules/core/tools/nvcc.lua @@ -352,7 +352,7 @@ function compile(self, sourcefile, objectfile, dependinfo, flags) local lines = 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 + if line:find("error:", 1, true) or line:find("错误:", 1, true) or line:match("ptxas fatal%s*:") or line:match("error %a+[0-9]+%s*:") then start = index break end @@ -363,6 +363,9 @@ function compile(self, sourcefile, objectfile, dependinfo, flags) if start == 0 then start = 1 end errors = table.concat(table.slice(lines, start, start + ((#lines - start > 16) and 16 or (#lines - start))), "\n") end + if not option.get("verbose") then + errors = errors .. "\n ${yellow}> in ${bright}" .. sourcefile + end -- raise compiling errors raise(errors) |
