summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/modules/private/detect/find_cudatool.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/xmake/modules/private/detect/find_cudatool.lua b/xmake/modules/private/detect/find_cudatool.lua
index b911615ec..e5cc282c8 100644
--- a/xmake/modules/private/detect/find_cudatool.lua
+++ b/xmake/modules/private/detect/find_cudatool.lua
@@ -49,10 +49,10 @@ function main(toolname, parse, opt)
local program
local toolchains = find_cuda()
if toolchains and toolchains.bindir then
- local file = path.join(toolchains.bindir, opt.program or toolname)
- if os.isfile(file) then
- program = find_program(file, opt)
- end
+ local opt2 = table.clone(opt)
+ opt2.paths = opt2.paths or {}
+ table.insert(opt2.paths, toolchains.bindir)
+ program = find_program(opt2.program or toolname, opt2)
end
-- not found? attempt to find program only