From 21829afa8efa18ca57e4bd9b322c6be1f84d392d Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 10 Jun 2015 11:51:06 +0800 Subject: fix merge option and config for boolean value --- xmake/scripts/base/project.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'xmake/scripts/base/project.lua') diff --git a/xmake/scripts/base/project.lua b/xmake/scripts/base/project.lua index 27041ac81..7b04c7fd0 100644 --- a/xmake/scripts/base/project.lua +++ b/xmake/scripts/base/project.lua @@ -341,14 +341,14 @@ function project._make(configs) -- merge the setted configures for k, v in pairs(configs._SET) do - if not target[k] then + if nil == target[k] then target[k] = v end end -- merge the added configures for k, v in pairs(configs._ADD) do - if not target[k] then + if nil == target[k] then target[k] = v else target[k] = table.join(v, target[k]) @@ -568,8 +568,7 @@ function project.menu() -- the default local default = utils.unwrap(opt.default) - if default then default = "true" - else default = "auto" end + if not default then default = "auto" end -- append it table.insert(menu, {nil, name, "kv", default, utils.unwrap(opt.description)}) -- cgit v1.3.1