diff options
| author | ruki <[email protected]> | 2022-01-19 20:54:30 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-01-19 20:54:30 +0800 |
| commit | 607a7db4f9daee501a70d7c976444cb5cc850530 (patch) | |
| tree | 9cad37de6d1c9fe41495b07ac7fcd4500248d362 | |
| parent | c692e42656a2406d8c27f6503d1d7ef60b820abb (diff) | |
| parent | b28f654357692175126a600cbd40c97d4eeeb581 (diff) | |
Merge pull request #1986 from xq114/dev
improve nvcc error output
| -rw-r--r-- | xmake/modules/core/tools/nvcc.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/xmake/modules/core/tools/nvcc.lua b/xmake/modules/core/tools/nvcc.lua index 471d62532..0d862af96 100644 --- a/xmake/modules/core/tools/nvcc.lua +++ b/xmake/modules/core/tools/nvcc.lua @@ -347,8 +347,14 @@ function compile(self, sourcefile, objectfile, dependinfo, flags) -- try removing the old object file for forcing to rebuild this source file os.tryrm(objectfile) + -- use nvcc/stdout as errors first from os.iorunv() + if type(errors) == "table" then + errors = (errors.stdout or "") .. (errors.stderr or "") + else + errors = tostring(errors) + end + -- find the start line of error - errors = tostring(errors) local lines = errors:split("\n", {plain = true}) local start = 0 for index, line in ipairs(lines) do |
