Skip to content

Commit

Permalink
xproperty: add package (#2608)
Browse files Browse the repository at this point in the history
* xproperty: add package

* disable plat
  • Loading branch information
star-hengxing authored Sep 17, 2023
1 parent b18323a commit 13ad383
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions packages/x/xproperty/xmake.lua
Original file line number Diff line number Diff line change
@@ -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 <xproperty/xobserved.hpp>
struct Foo : public xp::xobserved<Foo>
{
XPROPERTY(double, Foo, bar);
XPROPERTY(double, Foo, baz);
};
void test() {
Foo foo;
XOBSERVE(foo, bar, [](Foo& f){});
}
]]}, {configs = {languages = "c++14"}}))
end)

0 comments on commit 13ad383

Please sign in to comment.