RPATH to rocprofiler_LIBRARY_DIR for ROCm < v5.2 (#126)

* RPATH to rocprofiler_LIBRARY_DIR for ROCm < v5.2

- until v5.2 only librocprofiler64.so was symlinked in /opt/rocm. Thus linker using SOVERSION caused issues finding librocprofiler64.so.1

* Test ROCm w/ CMAKE_INSTALL_RPATH_USE_LINK_PATH=OFF

* INSTALL_RPATH_USE_LINK_PATH for omnitrace exe
此提交包含在:
Jonathan R. Madsen authored and GitHub committed 2022-08-02 14:19:04 -05:00
1 父節點 97d17a8ef8
當前提交 b79ce10fee
5 file changed
+31 -12

No files matched your search

+4 -6
查看文件
@@ -48,6 +48,7 @@ find_path(
mark_as_advanced(rocprofiler_hsa_INCLUDE_DIR)
# ----------------------------------------------------------------------------------------#
find_library(
rocprofiler_LIBRARY
NAMES rocprofiler64 rocprofiler
@@ -70,13 +71,15 @@ if(rocprofiler_LIBRARY)
endif()
mark_as_advanced(rocprofiler_LIBRARY rocprofiler_hsa-runtime_LIBRARY)
unset(_ROCM_ROCPROFILER_PATHS)
# ----------------------------------------------------------------------------------------#
find_package_handle_standard_args(
rocprofiler DEFAULT_MSG rocprofiler_ROOT_DIR rocprofiler_INCLUDE_DIR
rocprofiler_hsa_INCLUDE_DIR rocprofiler_LIBRARY rocprofiler_hsa-runtime_LIBRARY)
# ------------------------------------------------------------------------------#
# ----------------------------------------------------------------------------------------#
if(rocprofiler_FOUND)
add_library(rocprofiler::rocprofiler INTERFACE IMPORTED)
@@ -92,8 +95,3 @@ if(rocprofiler_FOUND)
target_link_libraries(rocprofiler::rocprofiler INTERFACE ${rocprofiler_LIBRARIES})
endif()
# ------------------------------------------------------------------------------#
unset(_ROCM_ROCPROFILER_PATHS)
# ------------------------------------------------------------------------------#