summaryrefslogtreecommitdiff
path: root/xmake/core/base
diff options
context:
space:
mode:
authorruki <[email protected]>2020-12-19 00:33:58 +0800
committerruki <[email protected]>2020-12-19 00:33:58 +0800
commitbbf9e7988955d4385639ee30f5df309ff6891736 (patch)
treecdd10d7f651bc6834c36b9874c7ce8c04b851c62 /xmake/core/base
parent37d4120c6cfd0454b45d606d2969e41631cc1f42 (diff)
add global cache directory
Diffstat (limited to 'xmake/core/base')
-rw-r--r--xmake/core/base/global.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/xmake/core/base/global.lua b/xmake/core/base/global.lua
index d493235d1..61d9d9e3b 100644
--- a/xmake/core/base/global.lua
+++ b/xmake/core/base/global.lua
@@ -110,6 +110,11 @@ function global.directory()
return global._DIRECTORY
end
+-- get the global cache directory
+function global.cachedir()
+ return global.get("cachedir") or path.join(global.directory(), "cache")
+end
+
-- load the global configuration
function global.load()