xmake.lua 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. package("frugally-deep")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://github.com/Dobiasd/frugally-deep")
  4. set_description("Header-only library for using Keras (TensorFlow) models in C++.")
  5. set_license("MIT")
  6. add_urls("https://github.com/Dobiasd/frugally-deep/archive/refs/tags/$(version).tar.gz",
  7. "https://github.com/Dobiasd/frugally-deep.git")
  8. add_versions("v0.15.29", "032cd525d4a7b9b3ebe28fd5e3984ac3e569da496f65d52c81030aabd9d0c52e")
  9. if is_plat("linux", "bsd") then
  10. add_syslinks("pthread")
  11. end
  12. add_deps("cmake")
  13. add_deps("functionalplus", "eigen")
  14. add_deps("nlohmann_json", {configs = {cmake = true}})
  15. on_install("windows", "macosx", "linux", "mingw", "cross", function (package)
  16. import("package.tools.cmake").install(package)
  17. end)
  18. on_test(function (package)
  19. local cxflags
  20. if package:is_plat("mingw") then
  21. cxflags = "-Wa,-mbig-obj"
  22. end
  23. assert(package:check_cxxsnippets({test = [[
  24. #include <fdeep/fdeep.hpp>
  25. void test() {
  26. const auto model = fdeep::load_model("fdeep_model.json");
  27. }
  28. ]]}, {configs = {languages = "c++14", cxflags = cxflags}}))
  29. end)