xmake.lua 934 B

123456789101112131415161718192021222324
  1. package("vc")
  2. set_homepage("https://github.com/VcDevel/Vc")
  3. set_description("SIMD Vector Classes for C++")
  4. set_license("BSD-3-Clause")
  5. add_urls("https://github.com/VcDevel/Vc/releases/download/$(version)/Vc-$(version).tar.gz")
  6. add_versions("1.4.2", "50d3f151e40b0718666935aa71d299d6370fafa67411f0a9e249fbce3e6e3952")
  7. add_configs("shared", {description = "Build shared library.", default = false, type = "boolean", readonly = true})
  8. add_deps("cmake")
  9. on_install("windows", "macosx", "linux", function (package)
  10. import("package.tools.cmake").install(package)
  11. end)
  12. on_test(function (package)
  13. assert(package:check_cxxsnippets({test = [[
  14. void test() {
  15. Vc::Memory<Vc::float_v, 1000> x_mem;
  16. x_mem.vector(0) = Vc::float_v::Random() * 2.f - 1.f;
  17. }
  18. ]]}, {configs = {languages = "c++17"}, includes = "Vc/Vc"}))
  19. end)