summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2023-11-02 23:22:41 +0800
committerruki <[email protected]>2023-11-02 23:22:41 +0800
commit8d73a80b51d05aa81b0aaf6da02824e33352ca57 (patch)
tree5315e75206cc495fb9e37121c361dc137876499a
parent086e6dd7a5e8d0b821b25f9e42516c93bd6aa223 (diff)
update check_xxx test
-rw-r--r--CHANGELOG.md2
-rw-r--r--tests/apis/check_xxx/xmake.lua1
2 files changed, 3 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 91605ddf4..68cf9f10c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,7 @@
* [#3381](https://github.com/xmake-io/xmake/issues/3381): Add `xmake test` support
* [#4276](https://github.com/xmake-io/xmake/issues/4276): Support custom scope api
* [#4286](https://github.com/xmake-io/xmake/pull/4286): Add Apple XROS support
+* [#4345](https://github.com/xmake-io/xmake/issues/4345): Support check sizeof
### Changes
@@ -1685,6 +1686,7 @@
* [#3381](https://github.com/xmake-io/xmake/issues/3381): 添加 `xmake test` 支持
* [#4276](https://github.com/xmake-io/xmake/issues/4276): 支持自定义域 API
* [#4286](https://github.com/xmake-io/xmake/pull/4286): 添加 Apple XROS 支持
+* [#4345](https://github.com/xmake-io/xmake/issues/4345): 支持检测类型大小 sizeof
### 改进
diff --git a/tests/apis/check_xxx/xmake.lua b/tests/apis/check_xxx/xmake.lua
index c68f71b48..c670d0ee1 100644
--- a/tests/apis/check_xxx/xmake.lua
+++ b/tests/apis/check_xxx/xmake.lua
@@ -18,6 +18,7 @@ target("foo")
return test();
}]], {tryrun = true})
check_csnippets("INT_SIZE", 'printf("%d", sizeof(int)); return 0;', {output = true, number = true})
+ check_sizeof("LONG_SIZE", "long")
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"})