diff options
| author | ruki <[email protected]> | 2019-06-11 23:02:03 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-06-11 12:12:23 +0800 |
| commit | 0708b41747a388e1d055de9cdba8b4a3d64203e0 (patch) | |
| tree | 103929a857de36046832849ef958b6c0a9d24b38 | |
| parent | f42f1b5a97f5fdbac4d74a2e43a32fcc71cee0c3 (diff) | |
fix find_cuda
| -rw-r--r-- | xmake/modules/detect/sdks/find_cuda.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/modules/detect/sdks/find_cuda.lua b/xmake/modules/detect/sdks/find_cuda.lua index d87d5b3b0..f9077a485 100644 --- a/xmake/modules/detect/sdks/find_cuda.lua +++ b/xmake/modules/detect/sdks/find_cuda.lua @@ -103,9 +103,9 @@ function main(sdkdir, opt) opt = opt or {} -- attempt to load cache first - local key = "detect.sdks.find_cuda." .. (sdkdir or "") + local key = "detect.sdks.find_cuda" local cacheinfo = cache.load(key) - if not opt.force and cacheinfo.cuda then + if not opt.force and cacheinfo.cuda and cacheinfo.cuda.sdkdir and os.isdir(cacheinfo.cuda.sdkdir) then return cacheinfo.cuda end |
