From 99cd3788c473a0f82a0a0729b79224e34eebbb6d Mon Sep 17 00:00:00 2001 From: Alex Xie Date: Thu, 16 Sep 2021 22:14:20 -0400 Subject: [PATCH] SWDEV-302875 - OpenCL build failure clinfo should rely on OpenCL interface, headere file and library only Change-Id: I8e09aa73b55f1a28c2e4403f52740803d0338c12 [ROCm/clr commit: 19ca1234602da34d2a4f1de5313f6882a99e954f] --- projects/clr/opencl/tools/clinfo/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/projects/clr/opencl/tools/clinfo/CMakeLists.txt b/projects/clr/opencl/tools/clinfo/CMakeLists.txt index 8f19f11e95..2af51a0d6b 100644 --- a/projects/clr/opencl/tools/clinfo/CMakeLists.txt +++ b/projects/clr/opencl/tools/clinfo/CMakeLists.txt @@ -1,6 +1,10 @@ add_executable(clinfo clinfo.cpp) -target_link_libraries(clinfo OpenCL amdocl) +target_compile_definitions(clinfo PRIVATE CL_TARGET_OPENCL_VERSION=220 HAVE_CL2_HPP) + +target_include_directories(clinfo PRIVATE "../../khronos/headers/opencl2.2/CL" "../../khronos/headers/opencl2.2/CL/.." "../../khronos/headers/opencl2.2/CL/../.." "../../khronos/headers/opencl2.2/CL/../../.." "../../khronos/headers/opencl2.2/CL/../../../..") + +target_link_libraries(clinfo OpenCL) INSTALL(TARGETS clinfo RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})