xmake.lua 1.1 KB

1234567891011121314151617181920212223
  1. package("ck")
  2. set_homepage("http://concurrencykit.org/")
  3. set_description("Concurrency primitives, safe memory reclamation mechanisms and non-blocking (including lock-free) data structures designed to aid in the research, design and implementation of high performance concurrent systems developed in C99+.")
  4. add_urls("https://github.com/concurrencykit/ck/archive/refs/tags/$(version).tar.gz",
  5. "https://github.com/concurrencykit/ck.git")
  6. add_versions("0.7.1", "97d2a21d5326ef79b4668be2e6eda6284ee77a64c0981b35fd9695c736c3d4ac")
  7. on_install("macosx", "linux", function (package)
  8. local configs = {}
  9. if package:config("shared") then
  10. table.insert(configs, "--disable-static")
  11. end
  12. local cxflags
  13. if package:is_plat("linux") and package:config("pic") ~= false then
  14. cxflags = "-fpic"
  15. end
  16. import("package.tools.autoconf").install(package, configs, {cxflags = cxflags})
  17. end)
  18. on_test(function (package)
  19. assert(package:has_cfuncs("ck_barrier_combining_init", {includes = "ck_barrier.h"}))
  20. end)