optional-lite: add package (#2469)

* optional-lite: add package

* fix test
pull/2473/head
star9029 1 year ago committed by GitHub
parent 0fabb13eeb
commit fb3ed98934
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 21
      packages/o/optional-lite/xmake.lua

@ -0,0 +1,21 @@
package("optional-lite")
set_kind("library", {headeronly = true})
set_homepage("https://github.com/martinmoene/optional-lite")
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")
set_license("BSL-1.0")
add_urls("https://github.com/martinmoene/optional-lite.git")
add_versions("2023.05.11", "00e9cf5ca5a496e857bc6a28ffed9f4189ce6646")
on_install(function (package)
os.cp("include", package:installdir())
end)
on_test(function (package)
assert(package:check_cxxsnippets({test = [[
#include <nonstd/optional.hpp>
nonstd::optional<int> test() {
return nonstd::nullopt;
}
]]}, {configs = {languages = "c++11"}}))
end)
Loading…
Cancel
Save