xmake.lua 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  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.7.0", "efb689fe5b02ddf039558a0f90c6ebc774b676e5ebb7176c14fb0107f023f4a6")
  9. add_versions("0.6.2", "a2b722560449da53faf4753288a5fb2074d88b1fa9bba257c85425b3e48ecb2c")
  10. on_check(function (package)
  11. assert(package:check_cxxsnippets({test = [[
  12. #include <thread>
  13. void test() {
  14. std::jthread t;
  15. }
  16. ]]}, {configs = {languages = "c++20"}}), "package(paul_thread_pool) require c++20 jthread")
  17. end)
  18. on_install(function (package)
  19. os.cp("include", package:installdir())
  20. end)
  21. on_test(function (package)
  22. assert(package:check_cxxsnippets({test = [[
  23. #include <thread>
  24. #include <thread_pool/thread_pool.h>
  25. void test()
  26. {
  27. dp::thread_pool pool;
  28. }
  29. ]]}, {configs = {languages = "c++20"}}))
  30. end)