2
0

xmake.lua 1.0 KB

1234567891011121314151617181920212223242526
  1. package("munkres-algorithm")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://github.com/aaron-michaux/munkres-algorithm")
  4. set_description("Modern C++ implementation of Munkres (Hungarian) algorithm")
  5. set_license("MIT")
  6. add_urls("https://github.com/aaron-michaux/munkres-algorithm.git")
  7. add_versions("2021.04.05", "30c5fbdde1e5a9fb44fcac55b7c0e8676baaccfd")
  8. add_patches("2021.04.05", "patches/2021.04.05/cstdint.patch", "ceca3960e7fbed9578517c1e5830e5e056d4c0bdcc250871d3277364729c78fe")
  9. on_install(function (package)
  10. os.cp("munkres.hpp", package:installdir("include"))
  11. end)
  12. on_test(function (package)
  13. assert(package:check_cxxsnippets({test = [[
  14. void test() {
  15. auto result = munkres_algorithm<double>(3, 3,
  16. [&](unsigned l, unsigned r) -> float {
  17. return 0;
  18. }
  19. );
  20. }
  21. ]]}, {configs = {languages = "c++14"}, includes = "munkres.hpp"}))
  22. end)