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
This commit is contained in:
Jonathan R. Madsen
2022-08-02 14:19:04 -05:00
committed by GitHub
parent 97d17a8ef8
commit b79ce10fee
5 changed files with 31 additions and 12 deletions
+4 -6
View File
@@ -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)
# ------------------------------------------------------------------------------#