summaryrefslogtreecommitdiff
path: root/xmake/actions/config/main.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2018-12-07 00:54:03 +0800
committerruki <[email protected]>2018-12-06 23:24:51 +0800
commitb4f35402ca2a97708dc46f6e48d60a3f5bf02f5e (patch)
tree2295e9ccea8377ea90b9407edce14bdb443e9970 /xmake/actions/config/main.lua
parentb03855d7dbc88bc38c07d7b62ea73de0dbbef9f6 (diff)
improve set_config
Diffstat (limited to 'xmake/actions/config/main.lua')
-rw-r--r--xmake/actions/config/main.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/xmake/actions/config/main.lua b/xmake/actions/config/main.lua
index 57d2e5043..cab2dc2d7 100644
--- a/xmake/actions/config/main.lua
+++ b/xmake/actions/config/main.lua
@@ -242,6 +242,15 @@ function main()
end
end
+ -- merge the project options after default options
+ for name, value in pairs(project.get("config")) do
+ value = table.unwrap(value)
+ assert(type(value) == "string", "set_config(%s): too much values", name)
+ if not config.readonly(name) then
+ config.set(name, value)
+ end
+ end
+
-- merge the checked configure
local recheck = _need_check(options_changed or not configcache)
if recheck then