Add marl to xmake repo (#737)

* Add marl to xmake repo

* Update xmake.lua

* Update xmake.lua

Co-authored-by: ruki <waruqi@gmail.com>
pull/740/head
Kelvin Zhang 3 years ago committed by GitHub
parent aeafaecbe9
commit bf5708e378
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 36
      packages/m/marl/xmake.lua

@ -0,0 +1,36 @@
package("marl")
set_homepage("https://github.com/google/marl")
set_description("Marl is a hybrid thread / fiber task scheduler written in C++ 11.")
add_urls("https://github.com/google/marl.git")
add_versions("2021.8.18", "49602432d97222eec1e6c8e4f70723c3864c49c1")
add_deps("cmake")
if is_plat("linux", "bsd") then
add_syslinks("pthread")
end
on_install("windows", "linux", "macosx", function (package)
local configs = {"-DMARL_INSTALL=on"}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
if package:config("shared") then
table.insert(configs, "-DBUILD_SHARED_LIBS=on")
else
table.insert(configs, "-DBUILD_SHARED_LIBS=off")
end
import("package.tools.cmake").install(package, configs)
end)
on_test(function (package)
assert(package:check_cxxsnippets({
test = [[
#include <marl/scheduler.h>
void test() {
marl::Scheduler scheduler(marl::Scheduler::Config::allCores());
}
]]},
{configs = {languages = "c++17"}
}))
end)
Loading…
Cancel
Save