summaryrefslogtreecommitdiff
path: root/xmake/modules/private/utils/complete_helper.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/modules/private/utils/complete_helper.lua')
-rw-r--r--xmake/modules/private/utils/complete_helper.lua18
1 files changed, 7 insertions, 11 deletions
diff --git a/xmake/modules/private/utils/complete_helper.lua b/xmake/modules/private/utils/complete_helper.lua
index 4e8c38e8f..7a8f36585 100644
--- a/xmake/modules/private/utils/complete_helper.lua
+++ b/xmake/modules/private/utils/complete_helper.lua
@@ -18,31 +18,27 @@
-- @file complete_helper.lua
--
+-- imports
+import("core.project.project")
+import("core.project.config")
+
+-- get targets
function targets()
return try
{
function ()
- import("core.project.project")
- import("core.project.config")
-
- -- load config
config.load()
-
return table.keys(project.targets())
end
}
end
+-- get runnable targets
function runable_targets()
return try
{
function ()
- import("core.project.project")
- import("core.project.config")
-
- -- load config
config.load()
-
local targets = project.targets()
local runable = {}
for k, v in pairs(targets) do
@@ -53,4 +49,4 @@ function runable_targets()
return runable
end
}
-end \ No newline at end of file
+end