xmake.lua 820 B

123456789101112131415161718192021
  1. package("optional-lite")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://github.com/martinmoene/optional-lite")
  4. set_description("optional lite - A C++17-like optional, a nullable object 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/optional-lite.git")
  7. add_versions("2023.05.11", "00e9cf5ca5a496e857bc6a28ffed9f4189ce6646")
  8. on_install(function (package)
  9. os.cp("include", package:installdir())
  10. end)
  11. on_test(function (package)
  12. assert(package:check_cxxsnippets({test = [[
  13. #include <nonstd/optional.hpp>
  14. nonstd::optional<int> test() {
  15. return nonstd::nullopt;
  16. }
  17. ]]}, {configs = {languages = "c++11"}}))
  18. end)