summaryrefslogtreecommitdiff
path: root/xmake/scripts/base/config.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/scripts/base/config.lua')
-rw-r--r--xmake/scripts/base/config.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/xmake/scripts/base/config.lua b/xmake/scripts/base/config.lua
index 6b2849564..d03a98c93 100644
--- a/xmake/scripts/base/config.lua
+++ b/xmake/scripts/base/config.lua
@@ -179,6 +179,12 @@ function config.load()
assert(option._MENU)
assert(option._MENU.config)
+ -- the target name
+ local name = options.target or options._DEFAULTS.target
+ if not name then
+ return "no given target name!"
+ end
+
-- does not clean the cached configure?
if not options.clean then
@@ -235,10 +241,6 @@ function config.load()
end
end
- -- the target name
- local name = options.target or options._DEFAULTS.target
- assert(name and type(name) == "string")
-
-- init configs if not exists
if not config._CONFIGS then
-- clear configs and mark as "rebuild"