summaryrefslogtreecommitdiff
path: root/xmake/core/base/option.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/core/base/option.lua')
-rw-r--r--xmake/core/base/option.lua14
1 files changed, 0 insertions, 14 deletions
diff --git a/xmake/core/base/option.lua b/xmake/core/base/option.lua
index 76dcc633a..8448788c5 100644
--- a/xmake/core/base/option.lua
+++ b/xmake/core/base/option.lua
@@ -64,8 +64,6 @@ end
-- get the top context
function option._context()
-
- -- the contexts
local contexts = option._CONTEXTS
if contexts then
return contexts[#contexts]
@@ -74,29 +72,17 @@ end
-- save context
function option.save(taskname)
-
- -- init contexts
option._CONTEXTS = option._CONTEXTS or {}
-
- -- new a context
local context = {options = {}, defaults = {}, taskname = taskname}
-
- -- init defaults
if taskname then
context.defaults = option.defaults(taskname) or context.defaults
end
-
- -- push this new context to the top stack
table.insert(option._CONTEXTS, context)
-
- -- ok
return context
end
-- restore context
function option.restore()
-
- -- pop it
if option._CONTEXTS then
table.remove(option._CONTEXTS)
end