Fix rocprofiler installation (#73)
- install rocprofiler library - define AMD_INTERNAL_BUILD when including hsa/hsa.h - install include/rocprofiler/registration.h header - fix samples/pc_sampling cmake via installed rocprofiler - fix samples/api_callback_tracing cmake via installed rocprofiler - fix samples/api_buffered_tracing cmake via installed rocprofiler - set cmake_minimum_required in samples/CMakeLists.txt - find dependent packages in rocprofiler-config.cmake.in - AMDDeviceLibs - amd_comgr - hsa-runtime64 - hip - export rocprofiler-hip and rocprofiler-hsa-runtime libraries - add Test Install Build step to CI workflow
This commit is contained in:
committato da
GitHub
parent
78425069e8
commit
8be4ca1a04
@@ -21,6 +21,56 @@ set(@PROJECT_NAME@_LIBRARIES)
|
||||
|
||||
add_library(@PROJECT_NAME@::@PROJECT_NAME@ INTERFACE IMPORTED)
|
||||
|
||||
find_package(
|
||||
AMDDeviceLibs
|
||||
REQUIRED
|
||||
CONFIG
|
||||
HINTS
|
||||
@AMDDeviceLibs_DIR@
|
||||
@rocm_version_DIR@
|
||||
PATHS
|
||||
@AMDDeviceLibs_DIR@
|
||||
@rocm_version_DIR@)
|
||||
|
||||
find_package(
|
||||
amd_comgr
|
||||
@amd_comgr_VERSION@
|
||||
EXACT
|
||||
REQUIRED
|
||||
CONFIG
|
||||
HINTS
|
||||
@amd_comgr_DIR@
|
||||
@rocm_version_DIR@
|
||||
PATHS
|
||||
@amd_comgr_DIR@
|
||||
@rocm_version_DIR@)
|
||||
|
||||
find_package(
|
||||
hsa-runtime64
|
||||
@hsa-runtime64_VERSION@
|
||||
EXACT
|
||||
REQUIRED
|
||||
CONFIG
|
||||
HINTS
|
||||
@hsa-runtime64_DIR@
|
||||
@rocm_version_DIR@
|
||||
PATHS
|
||||
@hsa-runtime64_DIR@
|
||||
@rocm_version_DIR@)
|
||||
|
||||
find_package(
|
||||
hip
|
||||
@hip_VERSION@
|
||||
EXACT
|
||||
REQUIRED
|
||||
CONFIG
|
||||
HINTS
|
||||
@hip_DIR@
|
||||
@rocm_version_DIR@
|
||||
PATHS
|
||||
@hip_DIR@
|
||||
@rocm_version_DIR@)
|
||||
|
||||
include("${@PROJECT_NAME@_CMAKE_DIR}/@PROJECT_NAME@-library-targets.cmake")
|
||||
|
||||
# Library dependencies
|
||||
@@ -39,8 +89,7 @@ if(@PROJECT_NAME@_FIND_COMPONENTS)
|
||||
if(TARGET ${TARG})
|
||||
set(@PROJECT_NAME@_${COMP}_FOUND 1)
|
||||
list(APPEND @PROJECT_NAME@_LIBRARIES ${TARG})
|
||||
target_link_libraries(@PROJECT_NAME@::@PROJECT_NAME@
|
||||
INTERFACE ${TARG})
|
||||
target_link_libraries(@PROJECT_NAME@::@PROJECT_NAME@ INTERFACE ${TARG})
|
||||
else()
|
||||
set(@PROJECT_NAME@_${COMP}_FOUND 0)
|
||||
endif()
|
||||
@@ -51,6 +100,7 @@ include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(
|
||||
@PROJECT_NAME@
|
||||
FOUND_VAR @PROJECT_NAME@_FOUND
|
||||
REQUIRED_VARS @PROJECT_NAME@_ROOT_DIR @PROJECT_NAME@_INCLUDE_DIR @PROJECT_NAME@_LIBRARIES
|
||||
REQUIRED_VARS @PROJECT_NAME@_ROOT_DIR @PROJECT_NAME@_INCLUDE_DIR
|
||||
@PROJECT_NAME@_LIBRARIES
|
||||
VERSION_VAR @PROJECT_NAME@_VERSION
|
||||
HANDLE_COMPONENTS)
|
||||
|
||||
@@ -42,8 +42,8 @@ rocprofiler_add_interface_library(rocprofiler-dl
|
||||
"Build flags for dynamic linking library" INTERNAL)
|
||||
rocprofiler_add_interface_library(rocprofiler-rt "Build flags for runtime library"
|
||||
INTERNAL)
|
||||
rocprofiler_add_interface_library(rocprofiler-hip "HIP library" INTERNAL)
|
||||
rocprofiler_add_interface_library(rocprofiler-hsa-runtime "HSA runtime library" INTERNAL)
|
||||
rocprofiler_add_interface_library(rocprofiler-hip "HIP library")
|
||||
rocprofiler_add_interface_library(rocprofiler-hsa-runtime "HSA runtime library")
|
||||
rocprofiler_add_interface_library(rocprofiler-amd-comgr "AMD comgr library" INTERNAL)
|
||||
rocprofiler_add_interface_library(rocprofiler-gtest "Google Test library" INTERNAL)
|
||||
rocprofiler_add_interface_library(rocprofiler-glog "Google Log library" INTERNAL)
|
||||
|
||||
Fai riferimento in un nuovo problema
Block a user