summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2023-02-26 23:05:09 +0800
committerruki <[email protected]>2023-02-26 23:05:09 +0800
commit319e3efdbdd42ca2283e8d09a169fe9f8a8fd7c2 (patch)
treea042e4a96da9969e643d47daf6666c6ff2c4b906
parent3f0c48dcfb366e61b9c8d2c1c0d6f8a565039061 (diff)
improve includes
-rw-r--r--xmake/includes/check_cflags.lua4
-rw-r--r--xmake/includes/check_cfuncs.lua4
-rw-r--r--xmake/includes/check_cincludes.lua4
-rw-r--r--xmake/includes/check_csnippets.lua4
-rw-r--r--xmake/includes/check_ctypes.lua4
-rw-r--r--xmake/includes/check_cxxflags.lua4
-rw-r--r--xmake/includes/check_cxxfuncs.lua4
-rw-r--r--xmake/includes/check_cxxincludes.lua4
-rw-r--r--xmake/includes/check_cxxsnippets.lua4
-rw-r--r--xmake/includes/check_cxxtypes.lua4
-rw-r--r--xmake/includes/check_features.lua4
-rw-r--r--xmake/includes/check_links.lua4
-rw-r--r--xmake/includes/check_macros.lua4
-rw-r--r--xmake/includes/check_syslinks.lua4
14 files changed, 28 insertions, 28 deletions
diff --git a/xmake/includes/check_cflags.lua b/xmake/includes/check_cflags.lua
index 773992a1e..cc126a31c 100644
--- a/xmake/includes/check_cflags.lua
+++ b/xmake/includes/check_cflags.lua
@@ -27,7 +27,7 @@
--
function check_cflags(definition, flags, opt)
opt = opt or {}
- local optname = "__" .. (opt.name or definition)
+ local optname = opt.name or ("__" .. definition)
save_scope()
option(optname)
set_showmenu(false)
@@ -55,7 +55,7 @@ end
--
function configvar_check_cflags(definition, flags, opt)
opt = opt or {}
- local optname = "__" .. (opt.name or definition)
+ local optname = opt.name or ("__" .. definition)
local defname, defval = table.unpack(definition:split('='))
save_scope()
option(optname)
diff --git a/xmake/includes/check_cfuncs.lua b/xmake/includes/check_cfuncs.lua
index f7f4a3e25..98f47a4ad 100644
--- a/xmake/includes/check_cfuncs.lua
+++ b/xmake/includes/check_cfuncs.lua
@@ -33,7 +33,7 @@
--
function check_cfuncs(definition, funcs, opt)
opt = opt or {}
- local optname = "__" .. (opt.name or definition)
+ local optname = opt.name or ("__" .. definition)
save_scope()
option(optname)
set_showmenu(false)
@@ -76,7 +76,7 @@ end
--
function configvar_check_cfuncs(definition, funcs, opt)
opt = opt or {}
- local optname = "__" .. (opt.name or definition)
+ local optname = opt.name or ("__" .. definition)
local defname, defval = table.unpack(definition:split('='))
save_scope()
option(optname)
diff --git a/xmake/includes/check_cincludes.lua b/xmake/includes/check_cincludes.lua
index 8bed49968..bc6eac5d9 100644
--- a/xmake/includes/check_cincludes.lua
+++ b/xmake/includes/check_cincludes.lua
@@ -27,7 +27,7 @@
--
function check_cincludes(definition, includes, opt)
opt = opt or {}
- local optname = "__" .. (opt.name or definition)
+ local optname = opt.name or ("__" .. definition)
save_scope()
option(optname)
set_showmenu(false)
@@ -51,7 +51,7 @@ end
--
function configvar_check_cincludes(definition, includes, opt)
opt = opt or {}
- local optname = "__" .. (opt.name or definition)
+ local optname = opt.name or ("__" .. definition)
local defname, defval = table.unpack(definition:split('='))
save_scope()
option(optname)
diff --git a/xmake/includes/check_csnippets.lua b/xmake/includes/check_csnippets.lua
index 0424b5361..57f232d45 100644
--- a/xmake/includes/check_csnippets.lua
+++ b/xmake/includes/check_csnippets.lua
@@ -28,7 +28,7 @@
--
function check_csnippets(definition, snippets, opt)
opt = opt or {}
- local optname = "__" .. (opt.name or definition)
+ local optname = opt.name or ("__" .. definition)
save_scope()
option(optname)
set_showmenu(false)
@@ -87,7 +87,7 @@ end
--
function configvar_check_csnippets(definition, snippets, opt)
opt = opt or {}
- local optname = "__" .. (opt.name or definition)
+ local optname = opt.name or ("__" .. definition)
local defname, defval = table.unpack(definition:split('='))
save_scope()
option(optname)
diff --git a/xmake/includes/check_ctypes.lua b/xmake/includes/check_ctypes.lua
index 3b9c7395e..218048a1f 100644
--- a/xmake/includes/check_ctypes.lua
+++ b/xmake/includes/check_ctypes.lua
@@ -27,7 +27,7 @@
--
function check_ctypes(definition, types, opt)
opt = opt or {}
- local optname = "__" .. (opt.name or definition)
+ local optname = opt.name or ("__" .. definition)
save_scope()
option(optname)
set_showmenu(false)
@@ -64,7 +64,7 @@ end
--
function configvar_check_ctypes(definition, types, opt)
opt = opt or {}
- local optname = "__" .. (opt.name or definition)
+ local optname = opt.name or ("__" .. definition)
local defname, defval = table.unpack(definition:split('='))
save_scope()
option(optname)
diff --git a/xmake/includes/check_cxxflags.lua b/xmake/includes/check_cxxflags.lua
index 9efdd7339..51a073fa3 100644
--- a/xmake/includes/check_cxxflags.lua
+++ b/xmake/includes/check_cxxflags.lua
@@ -27,7 +27,7 @@
--
function check_cxxflags(definition, flags, opt)
opt = opt or {}
- local optname = "__" .. (opt.name or definition)
+ local optname = opt.name or ("__" .. definition)
save_scope()
option(optname)
set_showmenu(false)
@@ -55,7 +55,7 @@ end
--
function configvar_check_cxxflags(definition, flags, opt)
opt = opt or {}
- local optname = "__" .. (opt.name or definition)
+ local optname = opt.name or ("__" .. definition)
local defname, defval = table.unpack(definition:split('='))
save_scope()
option(optname)
diff --git a/xmake/includes/check_cxxfuncs.lua b/xmake/includes/check_cxxfuncs.lua
index b1e2f5c0d..ec716ec53 100644
--- a/xmake/includes/check_cxxfuncs.lua
+++ b/xmake/includes/check_cxxfuncs.lua
@@ -33,7 +33,7 @@
--
function check_cxxfuncs(definition, funcs, opt)
opt = opt or {}
- local optname = "__" .. (opt.name or definition)
+ local optname = opt.name or ("__" .. definition)
save_scope()
option(optname)
set_showmenu(false)
@@ -76,7 +76,7 @@ end
--
function configvar_check_cxxfuncs(definition, funcs, opt)
opt = opt or {}
- local optname = "__" .. (opt.name or definition)
+ local optname = opt.name or ("__" .. definition)
local defname, defval = table.unpack(definition:split('='))
save_scope()
option(optname)
diff --git a/xmake/includes/check_cxxincludes.lua b/xmake/includes/check_cxxincludes.lua
index a8ac48d90..983e50035 100644
--- a/xmake/includes/check_cxxincludes.lua
+++ b/xmake/includes/check_cxxincludes.lua
@@ -27,7 +27,7 @@
--
function check_cxxincludes(definition, includes, opt)
opt = opt or {}
- local optname = "__" .. (opt.name or definition)
+ local optname = opt.name or ("__" .. definition)
save_scope()
option(optname)
set_showmenu(false)
@@ -48,7 +48,7 @@ end
--
function configvar_check_cxxincludes(definition, includes, opt)
opt = opt or {}
- local optname = "__" .. (opt.name or definition)
+ local optname = opt.name or ("__" .. definition)
local defname, defval = table.unpack(definition:split('='))
save_scope()
option(optname)
diff --git a/xmake/includes/check_cxxsnippets.lua b/xmake/includes/check_cxxsnippets.lua
index 2f460b713..adc864940 100644
--- a/xmake/includes/check_cxxsnippets.lua
+++ b/xmake/includes/check_cxxsnippets.lua
@@ -28,7 +28,7 @@
--
function check_cxxsnippets(definition, snippets, opt)
opt = opt or {}
- local optname = "__" .. (opt.name or definition)
+ local optname = opt.name or ("__" .. definition)
save_scope()
option(optname)
set_showmenu(false)
@@ -87,7 +87,7 @@ end
--
function configvar_check_cxxsnippets(definition, snippets, opt)
opt = opt or {}
- local optname = "__" .. (opt.name or definition)
+ local optname = opt.name or ("__" .. definition)
local defname, defval = table.unpack(definition:split('='))
save_scope()
option(optname)
diff --git a/xmake/includes/check_cxxtypes.lua b/xmake/includes/check_cxxtypes.lua
index 3a1ab58ef..d833e8439 100644
--- a/xmake/includes/check_cxxtypes.lua
+++ b/xmake/includes/check_cxxtypes.lua
@@ -27,7 +27,7 @@
--
function check_cxxtypes(definition, types, opt)
opt = opt or {}
- local optname = "__" .. (opt.name or definition)
+ local optname = opt.name or ("__" .. definition)
save_scope()
option(optname)
set_showmenu(false)
@@ -64,7 +64,7 @@ end
--
function configvar_check_cxxtypes(definition, types, opt)
opt = opt or {}
- local optname = "__" .. (opt.name or definition)
+ local optname = opt.name or ("__" .. definition)
local defname, defval = table.unpack(definition:split('='))
save_scope()
option(optname)
diff --git a/xmake/includes/check_features.lua b/xmake/includes/check_features.lua
index fa7a89a73..c5e86721f 100644
--- a/xmake/includes/check_features.lua
+++ b/xmake/includes/check_features.lua
@@ -27,7 +27,7 @@
--
function check_features(definition, features, opt)
opt = opt or {}
- local optname = "__" .. (opt.name or definition)
+ local optname = opt.name or ("__" .. definition)
save_scope()
option(optname)
set_showmenu(false)
@@ -60,7 +60,7 @@ end
--
function configvar_check_features(definition, features, opt)
opt = opt or {}
- local optname = "__" .. (opt.name or definition)
+ local optname = opt.name or ("__" .. definition)
local defname, defval = table.unpack(definition:split('='))
save_scope()
option(optname)
diff --git a/xmake/includes/check_links.lua b/xmake/includes/check_links.lua
index 2fb0512ad..8f29e30e2 100644
--- a/xmake/includes/check_links.lua
+++ b/xmake/includes/check_links.lua
@@ -27,7 +27,7 @@
--
function check_links(definition, links, opt)
opt = opt or {}
- local optname = "__" .. (opt.name or definition)
+ local optname = opt.name or ("__" .. definition)
save_scope()
option(optname)
set_showmenu(false)
@@ -48,7 +48,7 @@ end
--
function configvar_check_links(definition, links, opt)
opt = opt or {}
- local optname = "__" .. (opt.name or definition)
+ local optname = opt.name or ("__" .. definition)
local defname, defval = table.unpack(definition:split('='))
save_scope()
option(optname)
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()
diff --git a/xmake/includes/check_syslinks.lua b/xmake/includes/check_syslinks.lua
index 73b332f9e..29e1e2734 100644
--- a/xmake/includes/check_syslinks.lua
+++ b/xmake/includes/check_syslinks.lua
@@ -27,7 +27,7 @@
--
function check_syslinks(definition, links, opt)
opt = opt or {}
- local optname = "__" .. (opt.name or definition)
+ local optname = opt.name or ("__" .. definition)
save_scope()
option(optname)
set_showmenu(false)
@@ -48,7 +48,7 @@ end
--
function configvar_check_syslinks(definition, links, opt)
opt = opt or {}
- local optname = "__" .. (opt.name or definition)
+ local optname = opt.name or ("__" .. definition)
local defname, defval = table.unpack(definition:split('='))
save_scope()
option(optname)