summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/modules/detect/tools/nvcc/has_flags.lua7
1 files changed, 3 insertions, 4 deletions
diff --git a/xmake/modules/detect/tools/nvcc/has_flags.lua b/xmake/modules/detect/tools/nvcc/has_flags.lua
index 9a66c5f42..c30c87363 100644
--- a/xmake/modules/detect/tools/nvcc/has_flags.lua
+++ b/xmake/modules/detect/tools/nvcc/has_flags.lua
@@ -37,10 +37,9 @@ function _islinker(flags, opt)
end
-- try running
-function _try_running(...)
- local argv = {...}
+function _try_running(program, argv, opt)
local errors = nil
- return try { function () os.runv(unpack(argv)); return true end, catch { function (errs) errors = (errs or ""):trim() end }}, errors
+ return try { function () os.runv(program, argv, opt); return true end, catch { function (errs) errors = (errs or ""):trim() end }}, errors
end
-- attempt to check it from the argument list
@@ -124,7 +123,7 @@ function _check_try_running(flags, opt, islinker)
end
-- check flags
- return _try_running(opt.program, table.join(flags, args))
+ return _try_running(opt.program, table.join(flags, args), opt)
end
-- has_flags(flags)?