Skip to content

Commit f4e8738

Browse files
algo_plus: add package (#4540)
1 parent 12e6b31 commit f4e8738

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

packages/a/algo_plus/xmake.lua

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package("algo_plus")
2+
set_kind("library", {headeronly = true})
3+
set_homepage("https://csrt-ntua.github.io/AlgoPlus")
4+
set_description("AlgoPlus is a C++17 library for complex data structures and algorithms")
5+
set_license("Apache-2.0")
6+
7+
add_urls("https://github.com/CSRT-NTUA/AlgoPlus.git")
8+
add_versions("2024.07.02", "1287dfc5bf666bace15af9c14d03e807b71efa82")
9+
10+
add_deps("nlohmann_json")
11+
12+
on_install(function (package)
13+
for _, file in ipairs(os.files("src/**.h")) do
14+
io.replace(file, "../../../../third_party/json.hpp", "nlohmann/json.hpp", {plain = true})
15+
end
16+
os.cp("src/*", package:installdir("include"))
17+
end)
18+
19+
on_test(function (package)
20+
assert(package:check_cxxsnippets({test = [[
21+
void test() {
22+
std::vector<std::vector<double> > data;
23+
int CLUSTERS;
24+
kmeans a(data, CLUSTERS);
25+
}
26+
]]}, {configs = {languages = "c++17"}, includes = {"machine_learning/clustering/kmeans/kmeans.h"}}))
27+
end)

0 commit comments

Comments
 (0)