2022-08-27 06:41:41 +00:00
|
|
|
# Copyright (c) 2022 Huawei Device Co., Ltd.
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
|
2022-08-29 06:35:19 +00:00
|
|
|
import("//build/ohos.gni")
|
|
|
|
|
|
|
|
config("cl_config") {
|
|
|
|
cflags = [
|
|
|
|
"-std=c++17",
|
|
|
|
"-Wno-error=implicit-fallthrough",
|
|
|
|
"-Wno-deprecated-declarations",
|
|
|
|
]
|
2022-08-27 06:41:41 +00:00
|
|
|
}
|
|
|
|
|
2022-08-29 06:35:19 +00:00
|
|
|
config("cl_public_config") {
|
|
|
|
include_dirs = [
|
|
|
|
"./",
|
|
|
|
"include",
|
|
|
|
]
|
2022-08-27 06:41:41 +00:00
|
|
|
}
|
2022-08-29 06:35:19 +00:00
|
|
|
|
|
|
|
ohos_shared_library("libcl") {
|
|
|
|
visibility = [ "*" ]
|
2023-04-23 03:08:16 +00:00
|
|
|
sources = [ "src/opencl_wrapper.cpp" ]
|
2022-08-29 06:35:19 +00:00
|
|
|
configs = [ ":cl_config" ]
|
|
|
|
public_configs = [ ":cl_public_config" ]
|
2023-06-26 02:08:11 +00:00
|
|
|
output_name = "opencl_wrapper"
|
2022-08-29 06:35:19 +00:00
|
|
|
output_extension = "so"
|
2023-05-17 08:27:34 +00:00
|
|
|
innerapi_tags = [ "platformsdk_indirect" ]
|
2023-04-23 03:08:16 +00:00
|
|
|
part_name = "opencl-headers"
|
2023-06-19 02:43:39 +00:00
|
|
|
subsystem_name = "thirdparty"
|
2022-08-31 10:00:28 +00:00
|
|
|
}
|
|
|
|
|
2023-12-19 04:46:19 +00:00
|
|
|
config("opencl_headers_public_config") {
|
2023-12-19 05:29:02 +00:00
|
|
|
include_dirs = [ "./" ]
|
2023-12-19 04:46:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
source_set("opencl_headers") {
|
2023-12-20 03:53:22 +00:00
|
|
|
sources = [
|
2023-12-21 10:41:25 +00:00
|
|
|
"CL/cl.h",
|
2023-12-20 03:53:22 +00:00
|
|
|
"CL/cl_d3d10.h",
|
|
|
|
"CL/cl_d3d11.h",
|
|
|
|
"CL/cl_dx9_media_sharing.h",
|
|
|
|
"CL/cl_dx9_media_sharing_intel.h",
|
|
|
|
"CL/cl_egl.h",
|
|
|
|
"CL/cl_ext.h",
|
|
|
|
"CL/cl_ext_intel.h",
|
|
|
|
"CL/cl_function_types.h",
|
|
|
|
"CL/cl_gl.h",
|
2023-12-21 10:41:25 +00:00
|
|
|
"CL/cl_gl_ext.h",
|
2023-12-20 03:53:22 +00:00
|
|
|
"CL/cl_half.h",
|
|
|
|
"CL/cl_icd.h",
|
|
|
|
"CL/cl_layer.h",
|
|
|
|
"CL/cl_platform.h",
|
|
|
|
"CL/cl_va_api_media_sharing_intel.h",
|
|
|
|
"CL/cl_version.h",
|
2023-12-21 10:41:25 +00:00
|
|
|
"CL/opencl.h",
|
|
|
|
]
|
2023-12-19 05:29:02 +00:00
|
|
|
public_configs = [ ":opencl_headers_public_config" ]
|
2023-12-19 04:46:19 +00:00
|
|
|
}
|
|
|
|
|
2022-08-31 10:00:28 +00:00
|
|
|
group("cl_tests") {
|
|
|
|
deps = [ "tests:tests" ]
|
2023-04-23 03:08:16 +00:00
|
|
|
}
|