xmake.lua 1.1 KB

12345678910111213141516171819202122232425262728
  1. package("quickcpplib")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://github.com/ned14/quickcpplib")
  4. set_description("Eliminate all the tedious hassle when making state-of-the-art C++ 14 - 23 libraries!")
  5. set_license("Apache-2.0")
  6. add_urls("https://github.com/ned14/quickcpplib.git")
  7. add_versions("20221116", "52163d5a198f1d0a2583e683f090778686f9f998")
  8. add_deps("cmake")
  9. on_install(function (package)
  10. local configs = {}
  11. table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
  12. io.replace("CMakeLists.txt", "include(QuickCppLibMakeStandardTests)", "", {plain = true})
  13. io.replace("CMakeLists.txt", "include(QuickCppLibMakeDoxygen)", "", {plain = true})
  14. import("package.tools.cmake").install(package, configs)
  15. end)
  16. on_test(function (package)
  17. assert(package:check_cxxsnippets({test = [[
  18. #include <quickcpplib/uint128.hpp>
  19. void test () {
  20. auto bar = QUICKCPPLIB_NAMESPACE::integers128::uint128{};
  21. }
  22. ]]}, {configs = {languages = "c++17"}}))
  23. end)