summaryrefslogtreecommitdiff
path: root/xmake/actions/global/xmake.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2016-03-15 21:01:32 +0800
committerruki <[email protected]>2016-03-15 21:01:32 +0800
commitef9342cfecbcbf2f95220e08132e6530bf754f5f (patch)
treeeef4c52c57fb3fafe549d3962d1fed102e0b1ec6 /xmake/actions/global/xmake.lua
parentda7bc7414f499ec3420c1d1e062a8913b88935b7 (diff)
load config
Diffstat (limited to 'xmake/actions/global/xmake.lua')
-rwxr-xr-xxmake/actions/global/xmake.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/xmake/actions/global/xmake.lua b/xmake/actions/global/xmake.lua
index d93b6e524..35b36cda6 100755
--- a/xmake/actions/global/xmake.lua
+++ b/xmake/actions/global/xmake.lua
@@ -33,6 +33,9 @@ task("global")
import("core.base.option")
import("core.project.global")
+ -- load configure
+ global.load()
+
-- clean the cached configure?
if option.get("clean") then
@@ -40,7 +43,7 @@ task("global")
global.clean()
end
- -- merge the options
+ -- override the configure for the current options
for name, value in pairs(option.options()) do
if name ~= "verbose" and name ~= "clean" then
global.set(name, value)
@@ -49,7 +52,7 @@ task("global")
-- merge the default options
for name, value in pairs(option.defaults()) do
- if name ~= "verbose" and name ~= "clean" then
+ if name ~= "verbose" and name ~= "clean" and global.get(name) == nil then
global.set(name, value)
end
end