fix cuda tool finding
@@ -45,6 +45,8 @@ function main(toolname, parse, opt)
opt = opt or {}
opt.parse = opt.parse or parse
+ local program = nil
+
-- always keep consistency with cuda cache
local toolchains = find_cuda()
if toolchains and toolchains.bindir then
@@ -52,8 +54,7 @@ function main(toolname, parse, opt)
end
-- not found? attempt to find program only
- local program = nil
- if opt.program then
+ if not program then
program = find_program(opt.program or toolname, opt)
end
