algo_plus: add package (#4540)

pull/4548/head
star9029 5 months ago committed by GitHub
parent 12e6b31b56
commit f4e873870f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 27
      packages/a/algo_plus/xmake.lua

@ -0,0 +1,27 @@
package("algo_plus")
set_kind("library", {headeronly = true})
set_homepage("https://csrt-ntua.github.io/AlgoPlus")
set_description("AlgoPlus is a C++17 library for complex data structures and algorithms")
set_license("Apache-2.0")
add_urls("https://github.com/CSRT-NTUA/AlgoPlus.git")
add_versions("2024.07.02", "1287dfc5bf666bace15af9c14d03e807b71efa82")
add_deps("nlohmann_json")
on_install(function (package)
for _, file in ipairs(os.files("src/**.h")) do
io.replace(file, "../../../../third_party/json.hpp", "nlohmann/json.hpp", {plain = true})
end
os.cp("src/*", package:installdir("include"))
end)
on_test(function (package)
assert(package:check_cxxsnippets({test = [[
void test() {
std::vector<std::vector<double> > data;
int CLUSTERS;
kmeans a(data, CLUSTERS);
}
]]}, {configs = {languages = "c++17"}, includes = {"machine_learning/clustering/kmeans/kmeans.h"}}))
end)
Loading…
Cancel
Save