diff options
| author | ruki <[email protected]> | 2019-02-18 23:38:31 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-02-18 15:51:10 +0800 |
| commit | 3cec39ae2bde30ac922581303c157e207abb52d5 (patch) | |
| tree | ade84602fce4b2997bc55c6cc51e82d99bf2f3d0 | |
| parent | 43a40485dd6c06a490df4d8b1c4bc23e0d39260c (diff) | |
expand values for scope info
| -rw-r--r-- | xmake/core/base/scopeinfo.lua | 22 |
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 |
