diff options
| author | xq114 <[email protected]> | 2021-09-24 12:10:59 +0800 |
|---|---|---|
| committer | xq114 <[email protected]> | 2021-09-24 12:10:59 +0800 |
| commit | 113108b4a6cbda7211d42a133b29eb90f688bc8e (patch) | |
| tree | 4db8c5d1c59d20f6c2134cc4ef2e2285508b1ebf | |
| parent | ef34aa0c7f5a9996ff9c3863556b426a4f1f4da5 (diff) | |
improve comments
| -rw-r--r-- | xmake/includes/check_cflags.lua | 8 | ||||
| -rw-r--r-- | xmake/includes/check_cfuncs.lua | 2 | ||||
| -rw-r--r-- | xmake/includes/check_cincludes.lua | 1 | ||||
| -rw-r--r-- | xmake/includes/check_csnippets.lua | 2 | ||||
| -rw-r--r-- | xmake/includes/check_ctypes.lua | 2 | ||||
| -rw-r--r-- | xmake/includes/check_cxxflags.lua | 8 | ||||
| -rw-r--r-- | xmake/includes/check_cxxfuncs.lua | 2 | ||||
| -rw-r--r-- | xmake/includes/check_cxxincludes.lua | 1 | ||||
| -rw-r--r-- | xmake/includes/check_cxxsnippets.lua | 2 | ||||
| -rw-r--r-- | xmake/includes/check_cxxtypes.lua | 2 | ||||
| -rw-r--r-- | xmake/includes/check_features.lua | 1 | ||||
| -rw-r--r-- | xmake/includes/check_links.lua | 1 | ||||
| -rw-r--r-- | xmake/includes/check_syslinks.lua | 1 |
13 files changed, 27 insertions, 6 deletions
diff --git a/xmake/includes/check_cflags.lua b/xmake/includes/check_cflags.lua index 46758d0aa..85c9ef3c7 100644 --- a/xmake/includes/check_cflags.lua +++ b/xmake/includes/check_cflags.lua @@ -23,7 +23,7 @@ -- e.g. -- -- check_cflags("HAS_SSE2", "-msse2") --- check_cflags("HAS_SSE2", {"-msse2", "/arch:SSE2"}) +-- check_cflags("HAS_SSE2", {"-msse", "-msse2"}) -- function check_cflags(definition, flags, opt) opt = opt or {} @@ -45,8 +45,10 @@ end -- e.g. -- -- configvar_check_cflags("HAS_SSE2", "-msse2") --- configvar_check_cflags("HAS_SSE2", {"-msse2", "/arch:SSE2"}) --- configvar_check_cflags("SSE=2", "-msse2") +-- configvar_check_cflags("HAS_SSE2", {"-msse", "-msse2"}) +-- configvar_check_cflags("HAS_SSE2", "-msse2", {default = 0}) +-- configvar_check_cflags("SSE_STR=2", "-msse2") +-- configvar_check_cflags("SSE=2", "-msse2", {quote = false}) -- function configvar_check_cflags(definition, flags, opt) opt = opt or {} diff --git a/xmake/includes/check_cfuncs.lua b/xmake/includes/check_cfuncs.lua index 42d06e5ff..42d173a18 100644 --- a/xmake/includes/check_cfuncs.lua +++ b/xmake/includes/check_cfuncs.lua @@ -68,6 +68,8 @@ end -- -- configvar_check_cfuncs("HAS_SETJMP", "setjmp", {includes = {"signal.h", "setjmp.h"}, links = {}}) -- configvar_check_cfuncs("HAS_SETJMP", {"setjmp", "sigsetjmp{sigsetjmp((void*)0, 0);}"}) +-- configvar_check_cfuncs("HAS_SETJMP", "setjmp", {includes = {"setjmp.h"}, default = 0}) +-- configvar_check_cfuncs("CUSTOM_SETJMP=setjmp", "setjmp", {includes = {"setjmp.h"}, default = "", quote = false}) -- function configvar_check_cfuncs(definition, funcs, opt) opt = opt or {} diff --git a/xmake/includes/check_cincludes.lua b/xmake/includes/check_cincludes.lua index ced7c33a5..f9d69aad5 100644 --- a/xmake/includes/check_cincludes.lua +++ b/xmake/includes/check_cincludes.lua @@ -43,6 +43,7 @@ end -- e.g. -- -- configvar_check_cincludes("HAS_STRING_H", "string.h") +-- configvar_check_cincludes("HAS_STRING_H", "string.h", {default = 0}) -- configvar_check_cincludes("HAS_STRING_AND_STDIO_H", {"string.h", "stdio.h"}) -- function configvar_check_cincludes(definition, includes, opt) diff --git a/xmake/includes/check_csnippets.lua b/xmake/includes/check_csnippets.lua index 3f7f853e5..492c80a56 100644 --- a/xmake/includes/check_csnippets.lua +++ b/xmake/includes/check_csnippets.lua @@ -76,6 +76,8 @@ end -- -- configvar_check_csnippets("HAS_STATIC_ASSERT", "_Static_assert(1, \"\");", {includes = "stdio.h"}) -- configvar_check_csnippets("HAS_LONG_8", "return (sizeof(long) == 8)? 0 : -1;", {tryrun = true}) +-- configvar_check_csnippets("HAS_LONG_8", "return (sizeof(long) == 8)? 0 : -1;", {tryrun = true, default = 0}) +-- configvar_check_csnippets("LONG_SIZE=8", "return (sizeof(long) == 8)? 0 : -1;", {tryrun = true, quote = false}) -- configvar_check_csnippets("PTR_SIZE", 'printf("%d", sizeof(void*)); return 0;', {output = true, number = true}) -- function configvar_check_csnippets(definition, snippets, opt) diff --git a/xmake/includes/check_ctypes.lua b/xmake/includes/check_ctypes.lua index 934fc83b7..e0c3caa47 100644 --- a/xmake/includes/check_ctypes.lua +++ b/xmake/includes/check_ctypes.lua @@ -55,6 +55,8 @@ end -- e.g. -- -- configvar_check_ctypes("HAS_WCHAR", "wchar_t") +-- configvar_check_ctypes("HAS_WCHAR", "wchar_t", {default = 0}) +-- configvar_check_ctypes("CUSTOM_WCHAR=wchar_t", "wchar_t", {default = "", quote = false}) -- configvar_check_ctypes("HAS_WCHAR_AND_FLOAT", {"wchar_t", "float"}) -- function configvar_check_ctypes(definition, types, opt) diff --git a/xmake/includes/check_cxxflags.lua b/xmake/includes/check_cxxflags.lua index 36ca0ccd5..9a0880697 100644 --- a/xmake/includes/check_cxxflags.lua +++ b/xmake/includes/check_cxxflags.lua @@ -23,7 +23,7 @@ -- e.g. -- -- check_cxxflags("HAS_SSE2", "-msse2") --- check_cxxflags("HAS_SSE2", {"-msse2", "/arch:SSE2"}) +-- check_cxxflags("HAS_SSE2", {"-msse", "-msse2"}) -- function check_cxxflags(definition, flags, opt) opt = opt or {} @@ -45,8 +45,10 @@ end -- e.g. -- -- configvar_check_cxxflags("HAS_SSE2", "-msse2") --- configvar_check_cxxflags("HAS_SSE2", {"-msse2", "/arch:SSE2"}) --- configvar_check_cxxflags("SSE=2", "-msse2") +-- configvar_check_cxxflags("HAS_SSE2", {"-msse", "-msse2"}) +-- configvar_check_cxxflags("HAS_SSE2", "-msse2", {default = 0}) +-- configvar_check_cxxflags("SSE_STR=2", "-msse2") +-- configvar_check_cxxflags("SSE=2", "-msse2", {quote = false}) -- function configvar_check_cxxflags(definition, flags, opt) opt = opt or {} diff --git a/xmake/includes/check_cxxfuncs.lua b/xmake/includes/check_cxxfuncs.lua index 426f51edb..3a64075dc 100644 --- a/xmake/includes/check_cxxfuncs.lua +++ b/xmake/includes/check_cxxfuncs.lua @@ -68,6 +68,8 @@ end -- -- configvar_check_cxxfuncs("HAS_SETJMP", "setjmp", {includes = {"signal.h", "setjmp.h"}, links = {}}) -- configvar_check_cxxfuncs("HAS_SETJMP", {"setjmp", "sigsetjmp{sigsetjmp((void*)0, 0);}"}) +-- configvar_check_cxxfuncs("HAS_SETJMP", "setjmp", {includes = {"setjmp.h"}, default = 0}) +-- configvar_check_cxxfuncs("CUSTOM_SETJMP=setjmp", "setjmp", {includes = {"setjmp.h"}, default = "", quote = false}) -- function configvar_check_cxxfuncs(definition, funcs, opt) opt = opt or {} diff --git a/xmake/includes/check_cxxincludes.lua b/xmake/includes/check_cxxincludes.lua index ed9ecd6cd..a779ffd15 100644 --- a/xmake/includes/check_cxxincludes.lua +++ b/xmake/includes/check_cxxincludes.lua @@ -40,6 +40,7 @@ end -- e.g. -- -- configvar_check_cxxincludes("HAS_STRING_H", "string.h") +-- configvar_check_cxxincludes("HAS_STRING_H", "string.h", {default = 0}) -- configvar_check_cxxincludes("HAS_STRING_AND_STDIO_H", {"string.h", "stdio.h"}) -- function configvar_check_cxxincludes(definition, includes, opt) diff --git a/xmake/includes/check_cxxsnippets.lua b/xmake/includes/check_cxxsnippets.lua index 6da696c03..a65ed7355 100644 --- a/xmake/includes/check_cxxsnippets.lua +++ b/xmake/includes/check_cxxsnippets.lua @@ -76,6 +76,8 @@ end -- -- configvar_check_cxxsnippets("HAS_STATIC_ASSERT", "static_assert(1, \"\");") -- configvar_check_cxxsnippets("HAS_LONG_8", "return (sizeof(long) == 8)? 0 : -1;", {tryrun = true}) +-- configvar_check_cxxsnippets("HAS_LONG_8", "return (sizeof(long) == 8)? 0 : -1;", {tryrun = true, default = 0}) +-- configvar_check_cxxsnippets("LONG_SIZE=8", "return (sizeof(long) == 8)? 0 : -1;", {tryrun = true, quote = false}) -- configvar_check_cxxsnippets("PTR_SIZE", 'printf("%d", sizeof(void*)); return 0;', {output = true, number = true}) -- function configvar_check_cxxsnippets(definition, snippets, opt) diff --git a/xmake/includes/check_cxxtypes.lua b/xmake/includes/check_cxxtypes.lua index 1428e1fba..e53caae6e 100644 --- a/xmake/includes/check_cxxtypes.lua +++ b/xmake/includes/check_cxxtypes.lua @@ -55,6 +55,8 @@ end -- e.g. -- -- configvar_check_cxxtypes("HAS_WCHAR", "wchar_t") +-- configvar_check_cxxtypes("HAS_WCHAR", "wchar_t", {default = 0}) +-- configvar_check_cxxtypes("CUSTOM_WCHAR=wchar_t", "wchar_t", {default = "", quote = false}) -- configvar_check_cxxtypes("HAS_WCHAR_AND_FLOAT", {"wchar_t", "float"}) -- function configvar_check_cxxtypes(definition, types, opt) diff --git a/xmake/includes/check_features.lua b/xmake/includes/check_features.lua index e837c485c..7c02be173 100644 --- a/xmake/includes/check_features.lua +++ b/xmake/includes/check_features.lua @@ -52,6 +52,7 @@ end -- e.g. -- -- configvar_check_features("HAS_CONSTEXPR", "cxx_constexpr") +-- configvar_check_features("HAS_CONSTEXPR", "cxx_constexpr", {default = 0}) -- configvar_check_features("HAS_CONSEXPR_AND_STATIC_ASSERT", {"cxx_constexpr", "c_static_assert"}, {languages = "c++11"}) -- function configvar_check_features(definition, features, opt) diff --git a/xmake/includes/check_links.lua b/xmake/includes/check_links.lua index 40adb0193..06b8cb38c 100644 --- a/xmake/includes/check_links.lua +++ b/xmake/includes/check_links.lua @@ -40,6 +40,7 @@ end -- e.g. -- -- configvar_check_links("HAS_PTHREAD", "pthread") +-- configvar_check_links("HAS_PTHREAD", "pthread", {default = 0}) -- configvar_check_links("HAS_PTHREAD", {"pthread", "m", "dl"}) -- function configvar_check_links(definition, links, opt) diff --git a/xmake/includes/check_syslinks.lua b/xmake/includes/check_syslinks.lua index f7ac4a8df..133e24dcd 100644 --- a/xmake/includes/check_syslinks.lua +++ b/xmake/includes/check_syslinks.lua @@ -40,6 +40,7 @@ end -- e.g. -- -- configvar_check_syslinks("HAS_PTHREAD", "pthread") +-- configvar_check_syslinks("HAS_PTHREAD", "pthread", {default = 0}) -- configvar_check_syslinks("HAS_PTHREAD", {"pthread", "m", "dl"}) -- function configvar_check_syslinks(definition, links, opt) |
