xmake.lua 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. package("boost_math")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://www.boost.org/libs/math")
  4. set_description("Boost Math Library")
  5. set_license("BSL-1.0")
  6. add_defines("BOOST_MATH_STANDALONE")
  7. add_urls("https://github.com/boostorg/math/archive/refs/tags/boost-$(version).tar.gz",
  8. "https://github.com/boostorg/math.git")
  9. add_versions("1.90.0", "7d043e9ef0ac4b2242debc55a6fcd63fdcee1f09e8b695d19a73fbc23506356d")
  10. add_versions("1.89.0", "1981aae64deba30df31965671d2aaaecf701bfc96a4bd5b44dd3bd88e1c247a4")
  11. add_versions("1.88.0", "bb753392c3908292da46034a5435107f9e0546fda54da4d47b438aff5e4d9c48")
  12. add_versions("1.87.0", "33bc8bebff5e0f929397b84b52afbe9d0202d7b4ca68dc6516b08acba5edf023")
  13. add_versions("1.86.0", "c99287823d4b163e0c58df642557f1aaf2948e9b2f08211ff8c4f5ca1146ef8e")
  14. add_versions("1.85.0", "a6a82e2650b9bd9bf724430cb743f17e1ca12e08c98cfa2b9098128357b13848")
  15. add_versions("1.84.0", "8c98eea939158bcdc5f857a10f590aae836b7f35b55d5bb695343e1f5cc0bd93")
  16. add_versions("1.83.0", "53e5f7539a66899fe0fca3080405cbd5f7959da5394ec13664746741aece1705")
  17. add_versions("1.82.0", "6fc799a50081e8215553c8076b84b9b5c1c7f7bdf9d5b14773a4be03018e9eb7")
  18. add_versions("1.81.0", "cef18e59017b231456bba74cda89f993ae5e54f9a2682f220fbdb7bcce804148")
  19. add_versions("1.80.0", "0f47bbe0479ded85670e1b1b021eda0c03f36181bd35417757e4f519616f7f13")
  20. add_versions("1.79.0", "04645521ee93c810cfc71632b97856b9c0322b0215ec47319967382b18a12063")
  21. on_install(function (package)
  22. os.cp("include/boost", package:installdir("include"))
  23. end)
  24. on_test(function (package)
  25. assert(package:check_cxxsnippets({test = [[
  26. #include <boost/math/quadrature/tanh_sinh.hpp>
  27. #include <cassert>
  28. #include <cmath>
  29. void test() {
  30. boost::math::quadrature::tanh_sinh<double> integrator;
  31. double result = integrator.integrate([](double x) { return x; });
  32. assert(std::abs(result) < 1e-8);
  33. }
  34. ]]}, {configs = {languages = "c++17"}}))
  35. end)