diff options
| -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 |
