diff options
| author | Carbene Hu <[email protected]> | 2024-03-17 14:59:02 +0800 |
|---|---|---|
| committer | Carbene Hu <[email protected]> | 2024-03-17 14:59:02 +0800 |
| commit | 097a6d25fe308683161920f3cd9292063cddab14 (patch) | |
| tree | 115b697afc1b19a5d67207ed41a0ffb581fe1424 /tests | |
| parent | 9eb1a7489b99e05c65c62ccb651c65c02dc9b216 (diff) | |
feat: Add check_bigendian #4843
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/apis/check_xxx/config.h.in | 1 | ||||
| -rw-r--r-- | tests/apis/check_xxx/xmake.lua | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/tests/apis/check_xxx/config.h.in b/tests/apis/check_xxx/config.h.in index 9dedbaf96..d2f70893b 100644 --- a/tests/apis/check_xxx/config.h.in +++ b/tests/apis/check_xxx/config.h.in @@ -19,6 +19,7 @@ ${define HAS_C_STD_11} ${define HAS_C_STD_17} ${define HAS_GCC} ${define HAS_CXX20} +${define IS_BIG_ENDIAN} ${define NO_GCC} ${define PTR_SIZE} ${define HAVE_VISIBILITY} diff --git a/tests/apis/check_xxx/xmake.lua b/tests/apis/check_xxx/xmake.lua index fdef4b472..a72b575ae 100644 --- a/tests/apis/check_xxx/xmake.lua +++ b/tests/apis/check_xxx/xmake.lua @@ -6,6 +6,7 @@ target("foo") add_includedirs("$(buildir)") add_configfiles("config.h.in") + check_bigendian("IS_BIG_ENDIAN") check_ctypes("HAS_WCHAR", "wchar_t") check_cincludes("HAS_STRING_H", "string.h") check_csnippets("HAS_INT_4", "return (sizeof(int) == 4)? 0 : -1;", {tryrun = true}) @@ -20,6 +21,7 @@ target("foo") check_csnippets("INT_SIZE", 'printf("%d", sizeof(int)); return 0;', {output = true, number = true}) check_sizeof("LONG_SIZE", "long") check_sizeof("STRING_SIZE", "std::string", {includes = "string"}) + configvar_check_bigendian("IS_BIG_ENDIAN") configvar_check_cincludes("HAS_STRING_AND_STDIO_H", {"string.h", "stdio.h"}) configvar_check_ctypes("HAS_WCHAR_AND_FLOAT", {"wchar_t", "float"}) configvar_check_links("HAS_PTHREAD", {"pthread", "m", "dl"}) |
