summaryrefslogtreecommitdiff
path: root/xmake/scripts/base/option.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/scripts/base/option.lua')
-rw-r--r--xmake/scripts/base/option.lua8
1 files changed, 3 insertions, 5 deletions
diff --git a/xmake/scripts/base/option.lua b/xmake/scripts/base/option.lua
index 0a6f4dd92..13ac012d9 100644
--- a/xmake/scripts/base/option.lua
+++ b/xmake/scripts/base/option.lua
@@ -38,6 +38,7 @@ function option.init(argv, menu)
-- init _OPTIONS
xmake._OPTIONS = {}
+ xmake._OPTIONS._DEFAULTS = {}
-- save menu
option._MENU = menu
@@ -240,11 +241,8 @@ function option.init(argv, menu)
local key = o[2] or o[1]
assert(key)
- -- exists the default value?
- if not xmake._OPTIONS[key] and o[4] then
- -- save the default value
- xmake._OPTIONS[key] = o[4]
- end
+ -- save the default value
+ xmake._OPTIONS._DEFAULTS[key] = o[4]
end
end