Skip to content

Commit

Permalink
munkres-algorithm: add package
Browse files Browse the repository at this point in the history
  • Loading branch information
Chi-EEE committed Sep 15, 2024
1 parent 092f2de commit 39b8fb8
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions packages/m/munkres-algorithm/xmake.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package("munkres-algorithm")
set_kind("library", {headeronly = true})
set_homepage("https://github.com/aaron-michaux/munkres-algorithm")
set_description("Modern C++ implementation of Munkres (Hungarian) algorithm")
set_license("MIT")

add_urls("https://github.com/aaron-michaux/munkres-algorithm.git")
add_versions("2021.04.05", "30c5fbdde1e5a9fb44fcac55b7c0e8676baaccfd")

on_install(function (package)
os.cp("munkres.hpp", package:installdir("include"))
end)

on_test(function (package)
assert(package:check_cxxsnippets({test = [[
void test() {
auto result = munkres_algorithm<double>(3, 3,
[&](unsigned l, unsigned r) -> float {
return 0;
}
);
}
]]}, {configs = {languages = "c++14"}, includes = "munkres.hpp"}))
end)

0 comments on commit 39b8fb8

Please sign in to comment.