Xp/benchmark app ocl (#12112)

* Add some tip description about enable OpenCL for benchmark_app.

Signed-off-by: xipingya <xiping.yan@intel.com>

* Export doesn't work, we need to add -Dopencl_root_hints=[PATH]/OpenCL-CLHPP/include to cmake command.

Signed-off-by: xipingya <xiping.yan@intel.com>

Co-authored-by: Chen Peter <peter.chen@intel.com>
This commit is contained in:
Xiping YanandChen Peter authored and GitHub committed 2022-07-19 14:43:59 +08:00
1 parent 3c0b17f108
commit 6966af3ced
1 file changed
+6 -1
+6 -1
View File
@@ -22,7 +22,10 @@ else()
endif()
if(SAMPLES_ENABLE_OPENCL)
find_package(OpenCL)
find_package(OpenCL QUIET)
if(NOT OpenCL_FOUND)
MESSAGE(WARNING "OpenCL is disabled or not found, ${TARGET_NAME} will be built without OpenCL support. Install OpenCL.")
endif()
find_path(OpenCL_HPP_INCLUDE_DIR
NAMES
@@ -49,6 +52,8 @@ if(SAMPLES_ENABLE_OPENCL)
# Append OpenCL CPP headers to C headers and use both
set(OpenCL_HEADERS ${OpenCL_INCLUDE_DIR} ${OpenCL_HPP_INCLUDE_DIR})
set(OpenCL_LIB "OpenCL::OpenCL")
else()
MESSAGE(WARNING "OpenCL CPP header is not found, ${TARGET_NAME} will be built without OpenCL support. Download it from: https://github.com/KhronosGroup/OpenCL-CLHPP and set -Dopencl_root_hints=[PATH]/OpenCL-CLHPP/include to cmake.")
endif()
if(OpenCL_FOUND AND OpenCL_HEADERS)