|
|
|
@ -89,7 +89,23 @@ package("opencl") |
|
|
|
|
end) |
|
|
|
|
|
|
|
|
|
on_install("linux", "macosx", "android", function (package) |
|
|
|
|
package:add("links", "OpenCL") |
|
|
|
|
package:add("links", "OpenCLUtils") |
|
|
|
|
package:add("links", "OpenCLUtilsCpp") |
|
|
|
|
package:add("links", "OpenCLExt") |
|
|
|
|
|
|
|
|
|
local configs = {"-DOPENCL_SDK_BUILD_SAMPLES=OFF"} |
|
|
|
|
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release")) |
|
|
|
|
import("package.tools.cmake").install(package, configs) |
|
|
|
|
end) |
|
|
|
|
|
|
|
|
|
on_test(function (package) |
|
|
|
|
assert(package:check_csnippets({test = [[ |
|
|
|
|
#include <stddef.h> |
|
|
|
|
#include <CL/cl.h> |
|
|
|
|
void test () { |
|
|
|
|
cl_uint num_platforms; |
|
|
|
|
clGetPlatformIDs(0, NULL, &num_platforms); |
|
|
|
|
} |
|
|
|
|
]]}, {configs = {languages = "c11"}})) |
|
|
|
|
end) |