xmake.lua 1.2 KB

12345678910111213141516171819202122232425
  1. package("miniball")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://people.inf.ethz.ch/gaertner/subdir/software/miniball.html")
  4. set_description("For computing the smallest enclosing balls of points in arbitrary dimensions")
  5. set_license("GPL-3.0")
  6. add_urls("https://github.com/xmake-mirror/miniball/archive/refs/tags/$(version).tar.gz",
  7. "https://github.com/xmake-mirror/miniball.git")
  8. add_versions("v3.0", "8a7eedbae5619bc2b9ca9a249539008026f274886b0aeb3bb9796698b8763ba0")
  9. on_install(function (package)
  10. os.cp("Miniball.hpp", package:installdir("include"))
  11. end)
  12. on_test(function (package)
  13. assert(package:check_cxxsnippets({test = [[
  14. using Point = std::list<std::vector<double>>;
  15. using Coord = std::vector<double>;
  16. using MB = Miniball::Miniball<Miniball::CoordAccessor<Point::const_iterator, Coord::const_iterator>>;
  17. void test() {
  18. Point p{ { 0, 0 }, { 1, 0 }, { 0, 1 } };
  19. MB mb{ 2, p.begin(), p.end() };
  20. }
  21. ]]}, {configs = {languages = "c++11"}, includes = {"Miniball.hpp", "list", "vector"}}))
  22. end)