From 5c56dcd60dcce02babbcba862d71f3f891a712a4 Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 4 Apr 2024 00:59:22 +0800 Subject: add cjson test --- .../native_module_cjson/modules/lua/cjson/xmake.lua | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 tests/projects/other/native_module_cjson/modules/lua/cjson/xmake.lua (limited to 'tests/projects/other/native_module_cjson/modules/lua/cjson/xmake.lua') diff --git a/tests/projects/other/native_module_cjson/modules/lua/cjson/xmake.lua b/tests/projects/other/native_module_cjson/modules/lua/cjson/xmake.lua new file mode 100644 index 000000000..4455613bc --- /dev/null +++ b/tests/projects/other/native_module_cjson/modules/lua/cjson/xmake.lua @@ -0,0 +1,18 @@ +add_rules("mode.debug", "mode.release") + +target("cjson") + add_rules("module.shared") + set_warnings("all") + if is_plat("windows") then + set_languages("c89") + end + add_files("../../../../../../../core/src/lua-cjson/lua-cjson/*.c|fpconv.c") + -- Use internal strtod() / g_fmt() code for performance and disable multi-thread + add_defines("NDEBUG", "USE_INTERNAL_FPCONV") + add_defines("XM_CONFIG_API_HAVE_LUA_CJSON") + if is_plat("windows") then + -- Windows sprintf()/strtod() handle NaN/inf differently. Not supported. + add_defines("DISABLE_INVALID_NUMBERS") + add_defines("inline=__inline") + end + -- cgit v1.3.1