summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/core/base/scopeinfo.lua22
1 files changed, 21 insertions, 1 deletions
diff --git a/xmake/core/base/scopeinfo.lua b/xmake/core/base/scopeinfo.lua
index 646388280..73a5e4cc2 100644
--- a/xmake/core/base/scopeinfo.lua
+++ b/xmake/core/base/scopeinfo.lua
@@ -113,6 +113,9 @@ function _instance:_api_set_values(name, ...)
extra_config = nil
end
+ -- expand values
+ values = table.join(unpack(values))
+
-- handle values
local handled_values = self:_api_handle(values)
@@ -144,6 +147,9 @@ function _instance:_api_add_values(name, ...)
extra_config = nil
end
+ -- expand values
+ values = table.join(unpack(values))
+
-- save values
scope[name] = self:_api_handle(table.join2(table.wrap(scope[name]), values))
@@ -172,6 +178,9 @@ function _instance:_api_set_keyvalues(name, key, ...)
extra_config = nil
end
+ -- expand values
+ values = table.join(unpack(values))
+
-- save values to "name"
scope[name] = scope[name] or {}
scope[name][key] = self:_api_handle(values)
@@ -209,6 +218,9 @@ function _instance:_api_add_keyvalues(name, key, ...)
extra_config = nil
end
+ -- expand values
+ values = table.join(unpack(values))
+
-- save values to "name"
scope[name] = scope[name] or {}
scope[name][key] = self:_api_handle(table.join2(table.wrap(scope[name][key]), values))
@@ -288,6 +300,9 @@ function _instance:_api_set_pathes(name, ...)
extra_config = nil
end
+ -- expand values
+ values = table.join(unpack(values))
+
-- translate pathes
local pathes = self:_api_translate_pathes(values)
@@ -325,6 +340,9 @@ function _instance:_api_add_pathes(name, ...)
extra_config = nil
end
+ -- expand values
+ values = table.join(unpack(values))
+
-- translate pathes
local pathes = interp:_api_translate_pathes(values)
@@ -353,8 +371,10 @@ function _instance:_api_del_pathes(name, ...)
-- get interpreter
local interp = self:interpreter()
+ -- expand values
+ values = table.join(...)
+
-- translate pathes
- local values = {...}
local pathes = interp:_api_translate_pathes(values)
-- mark these pathes as deleted