xmake.lua 1005 B

1234567891011121314151617181920212223
  1. package("thread-pool")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://github.com/bshoshany/thread-pool")
  4. set_description("BS::thread_pool: a fast, lightweight, and easy-to-use C++17 thread pool library")
  5. set_license("MIT")
  6. add_urls("https://github.com/bshoshany/thread-pool/archive/refs/tags/$(version).tar.gz",
  7. "https://github.com/bshoshany/thread-pool.git")
  8. add_versions("v4.1.0", "be7abecbc420bb87919eeef729b13ff7c29d5ce547bdae284923296c695415bd")
  9. add_versions("v3.3.0", "b76c0103c7ed07c137bd5b1988b9c09da280bbbad37588a096d2954c8d996e0f")
  10. on_install(function (package)
  11. if package:version():ge("3.5.0") then
  12. os.vcp("include", package:installdir())
  13. else
  14. os.vcp("BS_thread_pool.hpp", package:installdir("include"))
  15. end
  16. end)
  17. on_test(function (package)
  18. assert(package:has_cxxtypes("BS::thread_pool", {configs = {languages = "c++17"}, includes = "BS_thread_pool.hpp"}))
  19. end)