diff options
| author | ruki <[email protected]> | 2019-06-08 00:30:43 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-06-07 21:04:22 +0800 |
| commit | 4b28a75f3cfd24d4b37af729db14925c1389c033 (patch) | |
| tree | 98adc7557666e800734da71bfbe6bf6a6b5ec3a9 | |
| parent | d1d8b6736904134159bc6271ca1cbd26d7796ca7 (diff) | |
...
| -rw-r--r-- | xmake/rules/cuda/env/xmake.lua | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/xmake/rules/cuda/env/xmake.lua b/xmake/rules/cuda/env/xmake.lua index af6810d10..876b85ad7 100644 --- a/xmake/rules/cuda/env/xmake.lua +++ b/xmake/rules/cuda/env/xmake.lua @@ -23,9 +23,16 @@ rule("cuda.env") -- before load before_load(function (target) - - -- find cuda - -- TODO - print("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!")) + end end) |
