xmake.lua 958 B

12345678910111213141516171819202122232425
  1. package("byte-lite")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://github.com/martinmoene/byte-lite")
  4. set_description("byte lite - A C++17-like byte type for C++98, C++11 and later in a single-file header-only library")
  5. set_license("BSL-1.0")
  6. add_urls("https://github.com/martinmoene/byte-lite/archive/refs/tags/$(version).tar.gz",
  7. "https://github.com/martinmoene/byte-lite.git")
  8. add_versions("v0.3.0", "1a19e237b12bb098297232b0a74ec08c18ac07ac5ac6e659c1d5d8a4ed0e4813")
  9. add_deps("cmake")
  10. on_install(function (package)
  11. import("package.tools.cmake").install(package, {"-DBYTE_LITE_OPT_BUILD_TESTS=OFF"})
  12. end)
  13. on_test(function (package)
  14. assert(package:check_cxxsnippets({test = [[
  15. #include <nonstd/byte.hpp>
  16. void test() {
  17. auto b1 = nonstd::to_byte( 0x5a );
  18. }
  19. ]]}, {configs = {languages = "c++11"}}))
  20. end)