xmake.lua 875 B

1234567891011121314151617181920212223
  1. package("transwarp")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://github.com/bloomen/transwarp")
  4. set_description("A header-only C++ library for task concurrency")
  5. set_license("MIT")
  6. add_urls("https://github.com/bloomen/transwarp/archive/refs/tags/$(version).zip")
  7. add_versions("2.2.3", "41c45e1131233fed24ded3e5e49ec412e97b76bdeaf3bd7259a7c8c8f2f7189a")
  8. on_install(function (package)
  9. os.cp("include", package:installdir())
  10. end)
  11. on_test(function (package)
  12. assert(package:check_cxxsnippets({test = [[
  13. #include "transwarp.h"
  14. namespace tw = transwarp;
  15. void test() {
  16. double x = 0;
  17. auto parent1 = tw::make_task(tw::root, [&x]{ return 13.3 + x; })->named("something");
  18. }
  19. ]]}, {configs = {languages = "c++17"}}))
  20. end)