add tl_optional (#3177)

pull/3185/head
Paul Reilly 10 months ago committed by GitHub
parent a6723e996c
commit 1161f65f54
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 24
      packages/t/tl_optional/xmake.lua

@ -0,0 +1,24 @@
package("tl_optional")
set_kind("library", {headeronly = true})
set_homepage("https://github.com/TartanLlama/optional")
set_description("C++11/14/17 std::optional with functional-style extensions and support for references.")
set_license("CC0")
set_urls("https://github.com/TartanLlama/optional/archive/refs/tags/$(version).zip",
"https://github.com/TartanLlama/optional.git")
add_versions("v1.1.0", "a336bb10f51945369c1dd6dc6d2a7086602ab9cab52c98a7a6224bfd782bc0c7")
on_install(function (package)
os.cp("include/tl", package:installdir("include"))
end)
on_test(function (package)
assert(package:check_cxxsnippets({test = [[
void test() {
tl::optional<int> e1 = 42;
}
]]}, {configs = {languages = "c++11"}, includes = {"tl/optional.hpp"}}))
end)
Loading…
Cancel
Save