diff options
| -rw-r--r-- | xmake/includes/check_csnippets.lua | 4 | ||||
| -rw-r--r-- | xmake/includes/check_cxxsnippets.lua | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/xmake/includes/check_csnippets.lua b/xmake/includes/check_csnippets.lua index 492c80a56..95aa0b2d5 100644 --- a/xmake/includes/check_csnippets.lua +++ b/xmake/includes/check_csnippets.lua @@ -60,6 +60,8 @@ function check_csnippets(definition, snippets, opt) if option:value() then if opt.number then option:add("defines", definition .. "=" .. tonumber(option:value())) + elseif opt.quote == false then + option:add("defines", definition .. "=" .. option:value()) else option:add("defines", definition .. "=\"" .. option:value() .. "\"") end @@ -113,7 +115,7 @@ function configvar_check_csnippets(definition, snippets, opt) if opt.output then after_check(function (option) if option:value() then - option:set("configvar", defname, opt.number and tonumber(option:value()) or option:value()) + option:set("configvar", defname, opt.number and tonumber(option:value()) or option:value(), {quote = opt.quote}) end end) end diff --git a/xmake/includes/check_cxxsnippets.lua b/xmake/includes/check_cxxsnippets.lua index a65ed7355..b46c650ff 100644 --- a/xmake/includes/check_cxxsnippets.lua +++ b/xmake/includes/check_cxxsnippets.lua @@ -60,6 +60,8 @@ function check_cxxsnippets(definition, snippets, opt) if option:value() then if opt.number then option:add("defines", definition .. "=" .. tonumber(option:value())) + elseif opt.quote == false then + option:add("defines", definition .. "=" .. option:value()) else option:add("defines", definition .. "=\"" .. option:value() .. "\"") end @@ -113,7 +115,7 @@ function configvar_check_cxxsnippets(definition, snippets, opt) if opt.output then after_check(function (option) if option:value() then - option:set("configvar", defname, opt.number and tonumber(option:value()) or option:value()) + option:set("configvar", defname, opt.number and tonumber(option:value()) or option:value(), {quote = opt.quote}) end end) end |
