From 13ad383ff1daa39191dee78a65018dda2af2f3ca Mon Sep 17 00:00:00 2001 From: star9029 Date: Sun, 17 Sep 2023 20:58:45 +0800 Subject: [PATCH] xproperty: add package (#2608) * xproperty: add package * disable plat --- packages/x/xproperty/xmake.lua | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 packages/x/xproperty/xmake.lua diff --git a/packages/x/xproperty/xmake.lua b/packages/x/xproperty/xmake.lua new file mode 100644 index 000000000..9bfdba905 --- /dev/null +++ b/packages/x/xproperty/xmake.lua @@ -0,0 +1,29 @@ +package("xproperty") + set_kind("library", {headeronly = true}) + set_homepage("https://github.com/jupyter-xeus/xproperty") + set_description("Traitlets-like C++ properties and implementation of the observer pattern") + set_license("BSD-3-Clause") + + add_urls("https://github.com/jupyter-xeus/xproperty.git") + add_versions("2021.04.13", "4e5cc851733ad5f57dd75c33d3beb75aba2569aa") + + add_deps("cmake", "xtl") + + on_install("windows", "linux", "macosx", function (package) + import("package.tools.cmake").install(package) + end) + + on_test(function (package) + assert(package:check_cxxsnippets({test = [[ + #include + struct Foo : public xp::xobserved + { + XPROPERTY(double, Foo, bar); + XPROPERTY(double, Foo, baz); + }; + void test() { + Foo foo; + XOBSERVE(foo, bar, [](Foo& f){}); + } + ]]}, {configs = {languages = "c++14"}})) + end)