fix taskflow (#268)

pull/270/head
ruki 4 years ago committed by GitHub
parent adb300acba
commit 599cbbc576
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 14
      packages/t/taskflow/xmake.lua

@ -5,7 +5,6 @@ package("taskflow")
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")
on_install(function (package)
@ -16,19 +15,18 @@ package("taskflow")
assert(package:check_cxxsnippets({test = [[
#include <assert.h>
static void test() {
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);
taskflow.parallel_for(range.begin(), range.end(), [&] (const int i) {
out[i] = i;
taskflow.for_each(range.begin(), range.end(), [&] (int i) {
printf("for_each on container item: %d\n", i);
});
executor.run(taskflow).get();
for (int i = 0; i < 10; i++) {
assert(out[i] == i);
}
}
]]}, {configs = {languages = "c++1z"}, includes = "taskflow/taskflow.hpp"}))
end)

Loading…
Cancel
Save