summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2024-03-22 10:59:15 +0800
committerGitHub <[email protected]>2024-03-22 10:59:15 +0800
commit24859ec6ddb1e11a8eaee0c5e79293a67161a4e7 (patch)
tree2460770e6a285eb740e57f69e15c1666ef2c6b68
parentc6528086f3815263f2d9c88bdae4f687609d0f51 (diff)
parentec1e44435eb6a25c52c18d7f779d8ff1c62eb9f5 (diff)
Merge pull request #4861 from charlesseizilles/patch-1
fix find_cudatools on windows
-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