package An official xmake package repository
https://xrepo.xmake.io/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
1.2 KiB
26 lines
1.2 KiB
7 months ago
|
package("rocket")
|
||
|
set_kind("library", {headeronly = true})
|
||
|
set_homepage("https://github.com/tripleslash/rocket")
|
||
|
set_description("Fast single header signal/slots library for C++")
|
||
|
|
||
|
add_urls("https://github.com/tripleslash/rocket/archive/348869fcda83f8b8b521c7654f83fea07ebe7a0a.tar.gz",
|
||
|
"https://github.com/tripleslash/rocket.git")
|
||
|
|
||
|
add_versions("2020.06.03", "de03b9c7f9b9478cfaa60683f95a7b0773dc0929d14e510c23f53b3804cc921f")
|
||
|
|
||
|
on_install(function (package)
|
||
|
io.replace("rocket.hpp", "return thread_id != std::thread::id{}", "return !(thread_id == std::thread::id{})", {plain = true})
|
||
|
io.replace("rocket.hpp", "&& thread_id != std::this_thread::get_id();", "&& !(thread_id == std::this_thread::get_id());", {plain = true})
|
||
|
os.cp("rocket.hpp", package:installdir("include"))
|
||
|
end)
|
||
|
|
||
|
on_test(function (package)
|
||
|
assert(package:check_cxxsnippets({test = [[
|
||
|
void test() {
|
||
|
rocket::signal<void()> thread_unsafe_signal;
|
||
|
rocket::thread_safe_signal<void()> thread_safe_signal;
|
||
|
thread_unsafe_signal.connect([]() {});
|
||
|
}
|
||
|
]]}, {configs = {languages = "c++17"}, includes = "rocket.hpp"}))
|
||
|
end)
|