summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2024-03-22 09:32:27 +0800
committerGitHub <[email protected]>2024-03-22 09:32:27 +0800
commitec1e44435eb6a25c52c18d7f779d8ff1c62eb9f5 (patch)
treeb80e2978a2174e8936eb60958dccde0022ad5090
parent7d779bd61133c455cc9b59a9e68820a3a9e3a754 (diff)
Update find_cudatool.lua
-rw-r--r--xmake/modules/private/detect/find_cudatool.lua9
1 files changed, 3 insertions, 6 deletions
diff --git a/xmake/modules/private/detect/find_cudatool.lua b/xmake/modules/private/detect/find_cudatool.lua
index 46aae0b27..e5cc282c8 100644
--- a/xmake/modules/private/detect/find_cudatool.lua
+++ b/xmake/modules/private/detect/find_cudatool.lua
@@ -49,12 +49,9 @@ function main(toolname, parse, opt)
local program
local toolchains = find_cuda()
if toolchains and toolchains.bindir then
- -- prepend the toolchain's bin dir to the paths
- local opt2 = table.join(opt) -- duplicate opt
- local paths = table.join(opt2.paths or {}, opt2.pathes or {})
- opt2.paths = table.join({toolchains.bindir}, paths)
- opt2.pathes = nil
-
+ 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