diff options
| author | charles seizilles <[email protected]> | 2024-03-21 16:17:00 +0100 |
|---|---|---|
| committer | charles seizilles <[email protected]> | 2024-03-21 16:17:00 +0100 |
| commit | 7d779bd61133c455cc9b59a9e68820a3a9e3a754 (patch) | |
| tree | 1defd6cdd6968b93ad0e7fc814c853e79985fa64 | |
| parent | 1ba52ff1c36ad48a656a881bbc959f944b68e028 (diff) | |
fix find_cudatools on windows
| -rw-r--r-- | xmake/modules/private/detect/find_cudatool.lua | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/xmake/modules/private/detect/find_cudatool.lua b/xmake/modules/private/detect/find_cudatool.lua index b911615ec..46aae0b27 100644 --- a/xmake/modules/private/detect/find_cudatool.lua +++ b/xmake/modules/private/detect/find_cudatool.lua @@ -49,10 +49,13 @@ 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 + -- 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 + + program = find_program(opt2.program or toolname, opt2) end -- not found? attempt to find program only |
