From cd817aa49d3e59094ea52cd1c11a819ee9fdde35 Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 23 May 2020 00:54:25 +0800 Subject: [PATCH] add co --- packages/c/co/xmake.lua | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 packages/c/co/xmake.lua diff --git a/packages/c/co/xmake.lua b/packages/c/co/xmake.lua new file mode 100644 index 000000000..b832ff4e8 --- /dev/null +++ b/packages/c/co/xmake.lua @@ -0,0 +1,21 @@ +package("co") + + set_homepage("https://github.com/idealvin/co") + set_description("Yet another libco and more.") + + add_urls("https://github.com/idealvin/co.git") + + on_install("macosx", "linux", "windows", function (package) + import("package.tools.xmake").install(package) + end) + + on_test(function (package) + assert(package:check_cxxsnippets({test = [[ + #include "co/def.h" + #include "co/atomic.h" + void test() { + int32 i32 = 0; + atomic_inc(&i32); + } + ]]}, {configs = {languages = "c++11"}})) + end)