xmake.lua 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. package("starpu")
  2. set_homepage("https://starpu.gitlabpages.inria.fr/")
  3. set_description("StarPU is a task programming library for hybrid architectures")
  4. set_license("LGPL-2.1")
  5. add_urls("https://files.inria.fr/starpu/starpu-$(version)/starpu-$(version).tar.gz")
  6. add_versions("1.3.8", "d35a27b219af8e7973888ebbff728ec0112ae9cda88d6b79c4cc7a1399b4d052")
  7. add_deps("hwloc")
  8. if is_plat("linux") then
  9. add_syslinks("pthread", "rt")
  10. end
  11. on_load("macosx", "linux", function (package)
  12. package:add("includedirs", format("include/starpu/%d.%d", package:version():major(), package:version():minor()))
  13. end)
  14. on_install("macosx", "linux", function (package)
  15. local configs = {"--disable-build-doc", "--disable-build-tests", "--disable-build-examples", "--disable-fortran"}
  16. if package:is_plat("macosx") then
  17. -- OpenCL is deprecated on Mac OS X
  18. table.insert(configs, "--disable-opencl")
  19. end
  20. if package:config("shared") then
  21. table.insert(configs, "--enable-shared=yes")
  22. table.insert(configs, "--enable-static=no")
  23. else
  24. table.insert(configs, "--enable-shared=no")
  25. table.insert(configs, "--enable-static=yes")
  26. end
  27. import("package.tools.autoconf").install(package, configs)
  28. end)
  29. on_test(function (package)
  30. assert(package:has_cfuncs("starpu_task_get_current", {includes = "starpu.h"}))
  31. end)