add transwarp (#2916)

Co-authored-by: Your Name <you@example.com>
pull/2920/head^2
xpxz 1 year ago committed by GitHub
parent 77367863ef
commit 418fbe6979
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 23
      packages/t/transwarp/xmake.lua

@ -0,0 +1,23 @@
package("transwarp")
set_kind("library", {headeronly = true})
set_homepage("https://github.com/bloomen/transwarp")
set_description("A header-only C++ library for task concurrency")
set_license("MIT")
add_urls("https://github.com/bloomen/transwarp/archive/refs/tags/$(version).zip")
add_versions("2.2.3", "41c45e1131233fed24ded3e5e49ec412e97b76bdeaf3bd7259a7c8c8f2f7189a")
on_install(function (package)
os.cp("include", package:installdir())
end)
on_test(function (package)
assert(package:check_cxxsnippets({test = [[
#include "transwarp.h"
namespace tw = transwarp;
void test() {
double x = 0;
auto parent1 = tw::make_task(tw::root, [&x]{ return 13.3 + x; })->named("something");
}
]]}, {configs = {languages = "c++17"}}))
end)
Loading…
Cancel
Save