summaryrefslogtreecommitdiff
path: root/xmake/rules
diff options
context:
space:
mode:
authorruki <[email protected]>2019-06-08 00:37:49 +0800
committerruki <[email protected]>2019-06-07 21:46:59 +0800
commit754f2510e5d521097ac15a15f6ec5912bc30358d (patch)
tree503083d291b44254b802ebe84a85eff1cf28994d /xmake/rules
parent4b28a75f3cfd24d4b37af729db14925c1389c033 (diff)
improve to find_cuda
Diffstat (limited to 'xmake/rules')
-rw-r--r--xmake/rules/cuda/env/xmake.lua11
1 files changed, 2 insertions, 9 deletions
diff --git a/xmake/rules/cuda/env/xmake.lua b/xmake/rules/cuda/env/xmake.lua
index 876b85ad7..713695e69 100644
--- a/xmake/rules/cuda/env/xmake.lua
+++ b/xmake/rules/cuda/env/xmake.lua
@@ -23,16 +23,9 @@ rule("cuda.env")
-- before load
before_load(function (target)
+ import("detect.sdks.find_cuda")
if not target:data("cuda") then
- local cuda = get_config("cuda")
- if not cuda then
- -- TODO improve find_cuda + cache
- local toolchain = import("detect.sdks.find_cuda")()
- if toolchain then
- cuda = toolchain.cudadir
- end
- end
- target:data_set("cuda", assert(find_qt(nil, {verbose = true}), "Qt SDK not found!"))
+ target:data_set("cuda", assert(find_cuda(), "Cuda SDK not found!"))
end
end)