From 3e80d7d89e6d0c22fc1da0f2782febf26fa7cb18 Mon Sep 17 00:00:00 2001 From: Anthony Cowley Date: Thu, 2 Jan 2020 13:17:45 -0500 Subject: [PATCH] Link libamd_comgr on the COMGR path This library is required when building with comgr. Not linking it as done in this PR can be worked around by having it available on the runtime linker's search path (i.e. LD_LIBRARY_PATH), but linking it as done here fixes an error where no OpenCL devices are found at runtime. --- api/opencl/amdocl/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/opencl/amdocl/CMakeLists.txt b/api/opencl/amdocl/CMakeLists.txt index 8ea8517..68a07c8 100644 --- a/api/opencl/amdocl/CMakeLists.txt +++ b/api/opencl/amdocl/CMakeLists.txt @@ -78,7 +78,7 @@ add_library(amdocl64 SHARED ${ADDITIONAL_LIBRARIES} ) if(${USE_COMGR_LIBRARY} MATCHES "yes") - target_link_libraries(amdocl64 oclelf pthread dl ${ROCT_LIBRARIES} ${ROCR_LIBRARIES}) + target_link_libraries(amdocl64 $ oclelf pthread dl ${ROCT_LIBRARIES} ${ROCR_LIBRARIES}) else() target_link_libraries(amdocl64 opencl_driver oclelf pthread dl ${ROCT_LIBRARIES} ${ROCR_LIBRARIES}) endif()