xmake.lua 1002 B

1234567891011121314151617181920212223242526272829
  1. package("status-code")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://github.com/ned14/status-code")
  4. set_description("Proposed SG14 status_code for the C++ standard")
  5. set_license("Apache-2.0")
  6. add_urls("https://github.com/ned14/status-code.git", {submodules = false})
  7. add_versions("2025.05.21", "525e324b1b85fbd1bf74046d760068b7e27b8cda")
  8. add_deps("cmake")
  9. on_install(function (package)
  10. import("package.tools.cmake").install(package, {"-DBUILD_TESTING=OFF"})
  11. end)
  12. on_test(function (package)
  13. assert(package:check_cxxsnippets({test = [[
  14. #if __has_include(<status-code/system_error2.hpp>)
  15. # include <status-code/system_error2.hpp>
  16. #else
  17. # include <system_error2.hpp>
  18. #endif
  19. void test() {
  20. system_error2::system_code sc;
  21. bool isFailure = sc.failure();
  22. }
  23. ]]}, {configs = {languages = "c++11"}}))
  24. end)