xmake.lua 1.1 KB

123456789101112131415161718192021222324252627
  1. package("fastor")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://github.com/romeric/Fastor")
  4. set_description("A lightweight high performance tensor algebra framework for modern C++")
  5. set_license("MIT")
  6. add_urls("https://github.com/romeric/Fastor/archive/refs/tags/V$(version).tar.gz",
  7. "https://github.com/romeric/Fastor.git")
  8. add_versions("0.6.3", "6ee13c75bed1221d0cdc0985d996bb79ae09b6d7e05798f1bb84458c2bdb238b")
  9. on_install("windows", "macosx", "linux", "mingw", function (package)
  10. os.cp("Fastor", package:installdir("include"))
  11. end)
  12. on_test(function (package)
  13. assert(package:check_cxxsnippets({test = [[
  14. enum {I,J,K,L,M,N};
  15. void test() {
  16. Fastor::Tensor<double,2,3,5> A;
  17. Fastor::Tensor<double,3,5,2,4> B;
  18. A.random();
  19. B.random();
  20. auto C = Fastor::einsum<Fastor::Index<I,J,K>,Fastor::Index<J,L,M,N>>(A,B);
  21. }
  22. ]]}, {configs = {languages = "c++14"}, includes = "Fastor/Fastor.h"}))
  23. end)