summaryrefslogtreecommitdiff
path: root/xmake/modules/lib/detect/has_flags.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2020-12-23 00:00:24 +0800
committerruki <[email protected]>2020-12-23 00:00:24 +0800
commit5eb09e88851744fb544c5b6ed5e20a448928daa0 (patch)
treef65e2570f193ec11693b174bc0b2b4ff1d37a421 /xmake/modules/lib/detect/has_flags.lua
parentfd125f21ece875cd6a5037725f2d84f24e658f41 (diff)
remove lib.detect.cache
Diffstat (limited to 'xmake/modules/lib/detect/has_flags.lua')
-rw-r--r--xmake/modules/lib/detect/has_flags.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/xmake/modules/lib/detect/has_flags.lua b/xmake/modules/lib/detect/has_flags.lua
index 4f151740f..4559f7959 100644
--- a/xmake/modules/lib/detect/has_flags.lua
+++ b/xmake/modules/lib/detect/has_flags.lua
@@ -22,7 +22,7 @@
import("core.base.option")
import("core.base.scheduler")
import("core.project.config")
-import("lib.detect.cache")
+import("core.cache.detectcache")
import("lib.detect.find_tool")
-- has the given flags for the current tool?
@@ -84,7 +84,7 @@ function main(name, flags, opt)
end
-- attempt to get result from cache first
- local cacheinfo = cache.load("lib.detect.has_flags")
+ local cacheinfo = detectcache:get("lib.detect.has_flags") or {}
local result = cacheinfo[key]
if result ~= nil and not opt.force then
return result
@@ -137,7 +137,8 @@ function main(name, flags, opt)
-- save result to cache
cacheinfo[key] = result
- cache.save("lib.detect.has_flags", cacheinfo)
+ detectcache:set("lib.detect.has_flags", cacheinfo)
+ detectcache:save()
return result
end