summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchooyy <[email protected]>2026-06-04 16:23:39 +0800
committerchooyy <[email protected]>2026-06-04 16:23:39 +0800
commit9c9c63ad974234bee8a771e4b15aa5cf4a778522 (patch)
treebf019f878dcf83369b935012147ace422876f958
parentea2d5d2454167ee9fe293427df729ff60baee22f (diff)
filter nvcc output
-rw-r--r--xmake/modules/core/tools/nvcc.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/xmake/modules/core/tools/nvcc.lua b/xmake/modules/core/tools/nvcc.lua
index 2b9eea319..9ce9efdb3 100644
--- a/xmake/modules/core/tools/nvcc.lua
+++ b/xmake/modules/core/tools/nvcc.lua
@@ -381,6 +381,11 @@ end
-- show warnings
function _show_warnings(self, output)
local lines = output:split('\n', {plain = true})
+ -- filter nvcc output, e.g. xxx.cu, tmpxft_xxx.cudafe1.cpp
+ table.remove_if(lines, function (_, line)
+ return line:match("^tmpxft_") or line:match("%.cu$")
+ end)
+
if #lines > 0 then
if not option.get("diagnosis") then
lines = table.slice(lines, 1, (#lines > 16 and 16 or #lines))