xmake.lua 1.0 KB

123456789101112131415161718192021222324252627
  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. add_urls("https://github.com/CSRT-NTUA/AlgoPlus.git")
  7. add_versions("2024.07.02", "1287dfc5bf666bace15af9c14d03e807b71efa82")
  8. add_deps("nlohmann_json")
  9. on_install(function (package)
  10. for _, file in ipairs(os.files("src/**.h")) do
  11. io.replace(file, "../../../../third_party/json.hpp", "nlohmann/json.hpp", {plain = true})
  12. end
  13. os.cp("src/*", package:installdir("include"))
  14. end)
  15. on_test(function (package)
  16. assert(package:check_cxxsnippets({test = [[
  17. void test() {
  18. std::vector<std::vector<double> > data;
  19. int CLUSTERS;
  20. kmeans a(data, CLUSTERS);
  21. }
  22. ]]}, {configs = {languages = "c++17"}, includes = {"machine_learning/clustering/kmeans/kmeans.h"}}))
  23. end)