xmake.lua 924 B

123456789101112131415161718192021222324
  1. package("ensmallen")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://ensmallen.org/")
  4. set_description("flexible C++ library for efficient numerical optimization")
  5. set_license("BSD-3-Clause")
  6. add_urls("https://ensmallen.org/files/ensmallen-$(version).tar.gz")
  7. add_versions("2.18.0", "62f7db71105305c0754a5f2a02fb8d05a5294bafa82584172b50609aabf7ea44")
  8. add_deps("cmake", "armadillo")
  9. on_install("windows", "macosx", "linux", function (package)
  10. io.replace("CMakeLists.txt", "add_subdirectory(tests)", "", {plain = true})
  11. import("package.tools.cmake").install(package)
  12. end)
  13. on_test(function (package)
  14. assert(package:check_cxxsnippets({test = [[
  15. void test() {
  16. ens::L_BFGS opt;
  17. opt.MaxIterations() = 10;
  18. }
  19. ]]}, {configs = {languages = "c++14"}, includes = "ensmallen.hpp"}))
  20. end)