From 55eb2fa3baaa571a616250ee8a89e98b4d82d49c Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 22 Aug 2020 22:07:05 +0800 Subject: fix has_features --- xmake/core/project/option.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xmake/core/project/option.lua') diff --git a/xmake/core/project/option.lua b/xmake/core/project/option.lua index f19e576a5..36a460313 100644 --- a/xmake/core/project/option.lua +++ b/xmake/core/project/option.lua @@ -123,6 +123,7 @@ function _instance:_do_check() self._core_tool_compiler = self._core_tool_compiler or sandbox_module.import("core.tool.compiler", {anonymous = true}) -- all features are supported? + features = table.wrap(features) local features_supported = self._core_tool_compiler.has_features(features, {target = self}) if features_supported and #features_supported == #features then passed = true @@ -130,7 +131,7 @@ function _instance:_do_check() -- trace if baseoption.get("verbose") or baseoption.get("diagnosis") then - for _, feature in ipairs(table.wrap(features)) do + for _, feature in ipairs(features) do utils.cprint("${dim}checking for the feature(%s) ... %s", feature, passed and "${color.success}${text.success}" or "${color.nothing}${text.nothing}") end end -- cgit v1.3.1