xmake.lua 1.0 KB

12345678910111213141516171819202122232425
  1. package("tclap")
  2. set_homepage("https://sourceforge.net/projects/tclap/")
  3. set_description("This is a simple templatized C++ library for parsing command line arguments.")
  4. set_license("MIT")
  5. set_urls("https://netcologne.dl.sourceforge.net/project/tclap/tclap-$(version).tar.bz2")
  6. add_versions("1.4.0-rc1", "33e18c7828f76a9e5f2a00afe575156520e383693059ca9bc34ff562927e20c6")
  7. add_deps("cmake")
  8. on_install(function (package)
  9. io.replace("CMakeLists.txt", "add_subdirectory(docs)", "", {plain = true})
  10. io.replace("CMakeLists.txt", "add_subdirectory(examples)", "", {plain = true})
  11. io.replace("CMakeLists.txt", "add_subdirectory(tests)", "", {plain = true})
  12. import("package.tools.cmake").install(package)
  13. end)
  14. on_test(function (package)
  15. assert(package:check_cxxsnippets({test = [[
  16. #include <tclap/CmdLine.h>
  17. void test() {
  18. TCLAP::CmdLine cmd("Test", ' ', "0.9");
  19. }
  20. ]]}, {configs = {languages = "c++98"}}))
  21. end)