summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/modules/detect/sdks/find_cuda.lua4
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