diff options
| author | ruki <[email protected]> | 2019-02-12 22:42:08 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-02-12 10:12:48 +0800 |
| commit | 960c3dc469aaa27746c0a2174f235bd32ce390ff (patch) | |
| tree | 04a5aec448b8624302c46cb01719f1d260694785 | |
| parent | d7194331ea134b0e1b54a5e09a59824b9c399d83 (diff) | |
improve check_xxx
| -rw-r--r-- | xmake/includes/check_cfuncs.lua | 6 | ||||
| -rw-r--r-- | xmake/includes/check_csnippets.lua | 6 | ||||
| -rw-r--r-- | xmake/includes/check_ctypes.lua | 12 | ||||
| -rw-r--r-- | xmake/includes/check_cxxfuncs.lua | 6 | ||||
| -rw-r--r-- | xmake/includes/check_cxxsnippets.lua | 6 | ||||
| -rw-r--r-- | xmake/includes/check_cxxtypes.lua | 12 | ||||
| -rw-r--r-- | xmake/modules/lib/detect/check_cxsnippets.lua | 10 |
7 files changed, 53 insertions, 5 deletions
diff --git a/xmake/includes/check_cfuncs.lua b/xmake/includes/check_cfuncs.lua index 5769976ff..aaa30f28d 100644 --- a/xmake/includes/check_cfuncs.lua +++ b/xmake/includes/check_cfuncs.lua @@ -56,6 +56,9 @@ function check_cfuncs(definition, funcs, opt) if opt.cflags then add_cxflags(opt.cxflags) end + if opt.defines then + add_defines(opt.defines) + end option_end() add_options(optname) end @@ -88,6 +91,9 @@ function configvar_check_cfuncs(definition, funcs, opt) if opt.cxflags then add_cxflags(opt.cxflags) end + if opt.defines then + add_defines(opt.defines) + end option_end() add_options(optname) end diff --git a/xmake/includes/check_csnippets.lua b/xmake/includes/check_csnippets.lua index a6fe448d9..db197529e 100644 --- a/xmake/includes/check_csnippets.lua +++ b/xmake/includes/check_csnippets.lua @@ -49,6 +49,9 @@ function check_csnippets(definition, snippets, opt) if opt.cxflags then add_cxflags(opt.cxflags) end + if opt.defines then + add_defines(opt.defines) + end option_end() add_options(optname) end @@ -80,6 +83,9 @@ function configvar_check_csnippets(definition, snippets, opt) if opt.cxflags then add_cxflags(opt.cxflags) end + if opt.defines then + add_defines(opt.defines) + end option_end() add_options(optname) end diff --git a/xmake/includes/check_ctypes.lua b/xmake/includes/check_ctypes.lua index a6178c7c0..8bed250b9 100644 --- a/xmake/includes/check_ctypes.lua +++ b/xmake/includes/check_ctypes.lua @@ -44,6 +44,12 @@ function check_ctypes(definition, types, opt) if opt.cxflags then add_cxflags(opt.cxflags) end + if opt.defines then + add_defines(opt.defines) + end + if opt.includes then + add_cincludes(opt.includes) + end option_end() add_options(optname) end @@ -70,6 +76,12 @@ function configvar_check_ctypes(definition, types, opt) if opt.cxflags then add_cxflags(opt.cxflags) end + if opt.defines then + add_defines(opt.defines) + end + if opt.includes then + add_cincludes(opt.includes) + end option_end() add_options(optname) end diff --git a/xmake/includes/check_cxxfuncs.lua b/xmake/includes/check_cxxfuncs.lua index b42b34cd0..2b53fc3f7 100644 --- a/xmake/includes/check_cxxfuncs.lua +++ b/xmake/includes/check_cxxfuncs.lua @@ -56,6 +56,9 @@ function check_cxxfuncs(definition, funcs, opt) if opt.cxxflags then add_cxxflags(opt.cxxflags) end + if opt.defines then + add_defines(opt.defines) + end option_end() add_options(optname) end @@ -88,6 +91,9 @@ function configvar_check_cxxfuncs(definition, funcs, opt) if opt.cxxflags then add_cxxflags(opt.cxxflags) end + if opt.defines then + add_defines(opt.defines) + end option_end() add_options(optname) end diff --git a/xmake/includes/check_cxxsnippets.lua b/xmake/includes/check_cxxsnippets.lua index d64747569..864397f68 100644 --- a/xmake/includes/check_cxxsnippets.lua +++ b/xmake/includes/check_cxxsnippets.lua @@ -49,6 +49,9 @@ function check_cxxsnippets(definition, snippets, opt) if opt.cxxflags then add_cxxflags(opt.cxxflags) end + if opt.defines then + add_defines(opt.defines) + end option_end() add_options(optname) end @@ -80,6 +83,9 @@ function configvar_check_cxxsnippets(definition, snippets, opt) if opt.cxxflags then add_cxxflags(opt.cxxflags) end + if opt.defines then + add_defines(opt.defines) + end option_end() add_options(optname) end diff --git a/xmake/includes/check_cxxtypes.lua b/xmake/includes/check_cxxtypes.lua index d361f14f4..29e1737c4 100644 --- a/xmake/includes/check_cxxtypes.lua +++ b/xmake/includes/check_cxxtypes.lua @@ -44,6 +44,12 @@ function check_cxxtypes(definition, types, opt) if opt.cxxflags then add_cxxflags(opt.cxxflags) end + if opt.defines then + add_defines(opt.defines) + end + if opt.includes then + add_cxxincludes(opt.includes) + end option_end() add_options(optname) end @@ -70,6 +76,12 @@ function configvar_check_cxxtypes(definition, types, opt) if opt.cxxflags then add_cxxflags(opt.cxxflags) end + if opt.defines then + add_defines(opt.defines) + end + if opt.includes then + add_cxxincludes(opt.includes) + end option_end() add_options(optname) end diff --git a/xmake/modules/lib/detect/check_cxsnippets.lua b/xmake/modules/lib/detect/check_cxsnippets.lua index 3239996be..e44043b99 100644 --- a/xmake/modules/lib/detect/check_cxsnippets.lua +++ b/xmake/modules/lib/detect/check_cxsnippets.lua @@ -201,23 +201,23 @@ function main(snippets, opt) if opt.verbose or option.get("verbose") or option.get("diagnosis") then local kind = ifelse(sourcekind == "cc", "c", "c++") if #includes > 0 then - cprint("${dim}checking for the %s includes(%s) ... %s", kind, table.concat(includes, ", "), ok and "${color.success}${text.success}" or "${color.nothing}${text.nothing}") + cprint("${dim}> checking for the %s includes(%s)", kind, table.concat(includes, ", ")) end if #types > 0 then - cprint("${dim}checking for the %s types(%s) ... %s", kind, table.concat(types, ", "), ok and "${color.success}${text.success}" or "${color.nothing}${text.nothing}") + cprint("${dim}> checking for the %s types(%s)", kind, table.concat(types, ", ")) end if #funcs > 0 then - cprint("${dim}checking for the %s funcs(%s) ... %s", kind, table.concat(funcs, ", "), ok and "${color.success}${text.success}" or "${color.nothing}${text.nothing}") + cprint("${dim}> checking for the %s funcs(%s)", kind, table.concat(funcs, ", ")) end if #links > 0 then - cprint("${dim}checking for the %s links(%s) ... %s", kind, table.concat(links, ", "), ok and "${color.success}${text.success}" or "${color.nothing}${text.nothing}") + cprint("${dim}> checking for the %s links(%s)", kind, table.concat(links, ", ")) end for idx_or_name, snippet in pairs(snippets) do local name = idx_or_name if type(name) == "number" then name = snippet:sub(1, 16) end - cprint("${dim}checking for the %s snippet(%s) ... %s", kind, name, ok and "${color.success}${text.success}" or "${color.nothing}${text.nothing}") + cprint("${dim}> checking for the %s snippet(%s)", kind, name) end end if errors and #errors > 0 and option.get("diagnosis") then |
