package An official xmake package repository
https://xrepo.xmake.io/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
1.5 KiB
31 lines
1.5 KiB
9 months ago
|
package("rapidfuzz")
|
||
|
set_kind("library", {headeronly = true})
|
||
|
set_homepage("https://rapidfuzz.github.io/rapidfuzz-cpp")
|
||
|
set_description("Rapid fuzzy string matching in C++ using the Levenshtein Distance")
|
||
|
set_license("MIT")
|
||
|
|
||
|
add_urls("https://github.com/rapidfuzz/rapidfuzz-cpp/archive/refs/tags/$(version).tar.gz",
|
||
|
"https://github.com/rapidfuzz/rapidfuzz-cpp.git")
|
||
|
|
||
|
add_versions("v3.0.2", "4fddce5c0368e78bd604c6b820e6be248d669754715e39b4a8a281bda4c06de1")
|
||
|
|
||
|
add_deps("cmake")
|
||
|
|
||
|
on_install(function (package)
|
||
|
import("package.tools.cmake").install(package)
|
||
|
end)
|
||
|
|
||
|
on_test(function (package)
|
||
|
assert(package:check_cxxsnippets({test = [[
|
||
|
void test() {
|
||
|
using rapidfuzz::fuzz::ratio;
|
||
|
double score1 = rapidfuzz::fuzz::ratio("this is a test", "this is a test!");
|
||
|
double score2 = rapidfuzz::fuzz::partial_ratio("this is a test", "this is a test!");
|
||
|
double score3 = rapidfuzz::fuzz::ratio("fuzzy wuzzy was a bear", "wuzzy fuzzy was a bear");
|
||
|
double score4 = rapidfuzz::fuzz::token_sort_ratio("fuzzy wuzzy was a bear", "wuzzy fuzzy was a bear");
|
||
|
double score5 = rapidfuzz::fuzz::token_sort_ratio("fuzzy was a bear", "fuzzy fuzzy was a bear");
|
||
|
double score6 = rapidfuzz::fuzz::token_set_ratio("fuzzy was a bear", "fuzzy fuzzy was a bear");
|
||
|
}
|
||
|
]]},{includes = "rapidfuzz/fuzz.hpp", configs = {languages = "c++17"}}))
|
||
|
end)
|