summaryrefslogtreecommitdiff
path: root/xmake/includes/check_macros.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/includes/check_macros.lua')
-rw-r--r--xmake/includes/check_macros.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/includes/check_macros.lua b/xmake/includes/check_macros.lua
index 1f5d441f7..d5ef3e8af 100644
--- a/xmake/includes/check_macros.lua
+++ b/xmake/includes/check_macros.lua
@@ -28,7 +28,7 @@
--
function check_macros(definition, macros, opt)
opt = opt or {}
- local optname = "__" .. (opt.name or definition)
+ local optname = opt.name or ("__" .. definition)
local snippets = {}
save_scope()
option(optname)
@@ -81,7 +81,7 @@ end
-- configvar_check_macros("HAS_CXX20", "__cplusplus >= 202002L", {languages = "c++20"})
function configvar_check_macros(definition, macros, opt)
opt = opt or {}
- local optname = "__" .. (opt.name or definition)
+ local optname = opt.name or ("__" .. definition)
local defname, defval = table.unpack(definition:split('='))
local snippets = {}
save_scope()