xmake.lua 989 B

12345678910111213141516171819202122232425
  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/$(version).tar.gz",
  6. "https://github.com/bfgroup/Lyra.git")
  7. add_versions("1.5.1", "11ccdfc6f776b9a2ebe987d9b4e492981f88f3642546fd1c2e1115741863cae0")
  8. add_versions("1.6", "919e92a9c02fea3f365a3a7bdccd8b306311a28a7f2044dac8e7651106d7b644")
  9. on_install(function (package)
  10. os.cp("include", package:installdir())
  11. end)
  12. on_test(function (package)
  13. assert(package:check_cxxsnippets({test = [[
  14. void test() {
  15. int width = 0;
  16. auto cli = lyra::cli()
  17. | lyra::opt(width, "width")
  18. ["-w"]["--width"]("How wide should it be?");
  19. }
  20. ]]}, {configs = {languages = "c++17"}, includes = "lyra/lyra.hpp"}))
  21. end)