diff options
| author | Ângelo Andrade Cirino <[email protected]> | 2022-01-17 10:56:56 -0300 |
|---|---|---|
| committer | Ângelo Andrade Cirino <[email protected]> | 2022-01-17 10:56:56 -0300 |
| commit | 92978c6f56ab66e17e19776d2e35832fa8be6e97 (patch) | |
| tree | 8156c9043b20682df56ee30f673ac84a2c042eeb /xmake/modules/core/tools/nvcc.lua | |
| parent | 274244bf3530a77ab3c93309e5ea5bb5d29907ae (diff) | |
| parent | b86e3b25723812bdf0c20bc1d3d4075d47b57523 (diff) | |
Merge branch 'master' of https://github.com/xmake-io/xmake into modnamefix
Diffstat (limited to 'xmake/modules/core/tools/nvcc.lua')
| -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) |
