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.
36 lines
1.4 KiB
36 lines
1.4 KiB
4 years ago
|
package("taskflow")
|
||
5 years ago
|
|
||
4 years ago
|
set_homepage("https://taskflow.github.io/")
|
||
5 years ago
|
set_description("A fast C++ header-only library to help you quickly write parallel programs with complex task dependencies")
|
||
|
|
||
4 years ago
|
add_urls("https://github.com/taskflow/taskflow.git")
|
||
|
add_urls("https://github.com/taskflow/taskflow/archive/$(version).tar.gz")
|
||
|
add_versions("v2.2.0", "a8ad8c94ceeac0bc18d8429f877e10a2af2cd44cd9dc420d9751e69f48ff85d1")
|
||
|
add_versions("v3.0.0", "553c88a6e56e115d29ac1520b8a0fea4557a5fcda1af1427bd3ba454926d03a2")
|
||
5 years ago
|
|
||
|
on_install(function (package)
|
||
5 years ago
|
os.cp("taskflow", package:installdir("include"))
|
||
5 years ago
|
end)
|
||
|
|
||
|
on_test(function (package)
|
||
|
assert(package:check_cxxsnippets({test = [[
|
||
|
#include <assert.h>
|
||
5 years ago
|
static void test() {
|
||
5 years ago
|
tf::Executor executor;
|
||
|
tf::Taskflow taskflow;
|
||
|
std::vector<int> range(10);
|
||
|
std::vector<int> out(10);
|
||
|
std::iota(range.begin(), range.end(), 0);
|
||
|
std::iota(out.begin(), out.end(), 0);
|
||
4 years ago
|
taskflow.parallel_for(range.begin(), range.end(), [&] (const int i) {
|
||
5 years ago
|
out[i] = i;
|
||
|
});
|
||
|
executor.run(taskflow).get();
|
||
|
for (int i = 0; i < 10; i++) {
|
||
|
assert(out[i] == i);
|
||
|
}
|
||
|
}
|
||
|
]]}, {configs = {languages = "c++1z"}, includes = "taskflow/taskflow.hpp"}))
|
||
4 years ago
|
end)
|
||
|
|