xmake.lua 1.1 KB

1234567891011121314151617181920212223242526
  1. package("lyra")
  2. set_homepage("https://www.bfgroup.xyz/Lyra/")
  3. set_description("A simple to use, composable, command line parser for C++ 11 and beyond")
  4. set_license("BSL-1.0")
  5. add_urls("https://github.com/bfgroup/Lyra/archive/refs/tags/$(version).tar.gz",
  6. "https://github.com/bfgroup/Lyra.git")
  7. add_versions("1.5.1", "11ccdfc6f776b9a2ebe987d9b4e492981f88f3642546fd1c2e1115741863cae0")
  8. add_versions("1.6", "919e92a9c02fea3f365a3a7bdccd8b306311a28a7f2044dac8e7651106d7b644")
  9. add_versions("1.6.1", "a93f247ed89eba11ca36eb24c4f8ba7be636bf24e74aaaa8e1066e0954bec7e3")
  10. on_install(function (package)
  11. os.cp("include", package:installdir())
  12. end)
  13. on_test(function (package)
  14. assert(package:check_cxxsnippets({test = [[
  15. void test() {
  16. int width = 0;
  17. auto cli = lyra::cli()
  18. | lyra::opt(width, "width")
  19. ["-w"]["--width"]("How wide should it be?");
  20. }
  21. ]]}, {configs = {languages = "c++17"}, includes = "lyra/lyra.hpp"}))
  22. end)