add tl_optional (#3177)
parent
a6723e996c
commit
1161f65f54
1 changed files with 24 additions and 0 deletions
@ -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…
Reference in new issue