2
0

xmake.lua 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. package("paul_thread_pool")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://github.com/DeveloperPaul123/thread-pool")
  4. set_description("A modern, fast, lightweight thread pool library based on C++20")
  5. set_license("MIT")
  6. add_urls("https://github.com/DeveloperPaul123/thread-pool/archive/refs/tags/$(version).zip",
  7. "https://github.com/DeveloperPaul123/thread-pool.git")
  8. add_versions("0.6.2", "a2b722560449da53faf4753288a5fb2074d88b1fa9bba257c85425b3e48ecb2c")
  9. on_check(function (package)
  10. assert(package:check_cxxsnippets({test = [[
  11. #include <thread>
  12. void test() {
  13. std::jthread t;
  14. }
  15. ]]}, {configs = {languages = "c++20"}}), "package(paul_thread_pool) require c++20 jthread")
  16. end)
  17. on_install(function (package)
  18. os.cp("include", package:installdir())
  19. end)
  20. on_test(function (package)
  21. assert(package:check_cxxsnippets({test = [[
  22. #include <thread>
  23. #include <thread_pool/thread_pool.h>
  24. void test()
  25. {
  26. dp::thread_pool pool;
  27. }
  28. ]]}, {configs = {languages = "c++20"}}))
  29. end)