summaryrefslogtreecommitdiff
path: root/xmake/core
diff options
context:
space:
mode:
authorOpportunityLiu <[email protected]>2019-08-20 14:38:39 +0800
committerOpportunityLiu <[email protected]>2019-08-20 14:38:39 +0800
commita0d6bcacb190ce0538ded1c15336b6abdafbb7c2 (patch)
tree1249c19309cdc30f3a99c9dd7180c7ca5065d798 /xmake/core
parent22a22766a667c3273fc4a4a2e58ce55aba8466b3 (diff)
support set_runenv
Diffstat (limited to 'xmake/core')
-rw-r--r--xmake/core/base/table.lua12
-rw-r--r--xmake/core/project/target.lua3
2 files changed, 14 insertions, 1 deletions
diff --git a/xmake/core/base/table.lua b/xmake/core/base/table.lua
index c08526c34..7d6717816 100644
--- a/xmake/core/base/table.lua
+++ b/xmake/core/base/table.lua
@@ -335,5 +335,17 @@ function table.imap(arr, mapper)
return newarr
end
+function table.reverse(arr)
+
+ assert(arr)
+
+ local revarr = {}
+ local l = #arr
+ for i = 1, l do
+ revarr[i] = arr[l - i + 1]
+ end
+ return revarr
+end
+
-- return module: table
return table
diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua
index 8011ff313..7cf262262 100644
--- a/xmake/core/project/target.lua
+++ b/xmake/core/project/target.lua
@@ -1674,11 +1674,12 @@ function target.apis()
-- target.set_xxx
"target.set_values"
, "target.set_configvar"
+ , "target.set_runenv"
-- target.add_xxx
, "target.add_values"
, "target.add_runenvs"
}
- , pathes =
+ , pathes =
{
-- target.set_xxx
"target.set_targetdir"