xmake.lua 1.3 KB

12345678910111213141516171819202122232425262728293031
  1. package("ucx")
  2. set_homepage("https://openucx.org/")
  3. set_description("Unified Communication X")
  4. set_license("BSD-3-Clause")
  5. add_urls("https://github.com/openucx/ucx/releases/download/v$(version)/ucx-$(version).tar.gz")
  6. add_versions("1.11.0", "b7189b69fe0e16e3c03784ef674e45687a9c520750bd74a45125c460ede37647")
  7. add_configs("cuda", {description = "Enable CUDA support.", default = false, type = "boolean"})
  8. on_load("linux", function (package)
  9. if package:config("cuda") then
  10. package:add("deps", "cuda")
  11. end
  12. end)
  13. on_install("linux", function (package)
  14. local configs = {"--disable-doxygen-doc", "--without-java", "--without-rte", "--without-fuse3", "--without-gdrcopy", "--without-rdmacm", "--without-knem", "--without-xpmem", "--without-ugni"}
  15. if package:config("cuda") then
  16. local cuda = package:dep("cuda"):fetch()
  17. table.insert(configs, "--with-cuda=" .. path.directory(cuda.sysincludedirs[1]))
  18. else
  19. table.insert(configs, "--without-cuda")
  20. end
  21. import("package.tools.autoconf").install(package, configs)
  22. end)
  23. on_test(function (package)
  24. assert(package:has_cfuncs("ucp_get_version_string", {includes = "ucp/api/ucp.h"}))
  25. end)