Configurable OpenCL usage in BA (#11344)
This commit is contained in:
parent
fad66d8442
commit
c795382b1f
@ -14,6 +14,14 @@ ie_add_sample(NAME ${TARGET_NAME}
|
||||
|
||||
# Optional OpenCL dependnency
|
||||
|
||||
if(DEFINED ENABLE_INTEL_GPU AND NOT ENABLE_INTEL_GPU)
|
||||
# Intel GPU plugin is turned off explicitly
|
||||
option(SAMPLES_ENABLE_OPENCL "Use OpenCL in benchmark_app" OFF)
|
||||
else()
|
||||
option(SAMPLES_ENABLE_OPENCL "Use OpenCL in benchmark_app" ON)
|
||||
endif()
|
||||
|
||||
if(SAMPLES_ENABLE_OPENCL)
|
||||
find_package(OpenCL)
|
||||
|
||||
find_path(OpenCL_HPP_INCLUDE_DIR
|
||||
@ -48,6 +56,7 @@ if(OpenCL_FOUND AND OpenCL_HEADERS)
|
||||
target_include_directories(${TARGET_NAME} PRIVATE ${OpenCL_HEADERS})
|
||||
target_compile_definitions(${TARGET_NAME} PRIVATE HAVE_GPU_DEVICE_MEM_SUPPORT)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Optional OpenCV dependency
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user