File tree Expand file tree Collapse file tree 3 files changed +12
-1
lines changed
Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -131,7 +131,14 @@ if(hip_VERSION VERSION_LESS "6.2")
131131endif ()
132132
133133target_link_libraries (rocprofiler-sdk-hip INTERFACE hip::host )
134+ # TODO: As of 2024/2/12, the hip::host target does not advertise its
135+ # include directory but amdhip64 does. This ordinarily wouldn't be an issue
136+ # because most folks just get it transitively, but here this is doing direct
137+ # property copying to get usage requirements.
138+ # The proper fix is for hip to export a hip::headers target with only usage
139+ # requirements and depend on that.
134140rocprofiler_config_nolink_target (rocprofiler-sdk-hip-nolink hip::host )
141+ rocprofiler_config_nolink_target (rocprofiler-sdk-hip-nolink hip::amdhip64 )
135142
136143# ----------------------------------------------------------------------------------------#
137144#
@@ -222,7 +229,9 @@ find_library(
222229 HINTS ${rocm_version_DIR} ${ROCM_PATH}
223230 PATHS ${rocm_version_DIR} ${ROCM_PATH} )
224231
225- target_link_libraries (rocprofiler-sdk-hsa-aql INTERFACE ${hsa-amd-aqlprofile64_library} )
232+ if (hsa-amd-aqlprofile64_library)
233+ target_link_libraries (rocprofiler-sdk-hsa-aql INTERFACE ${hsa-amd-aqlprofile64_library} )
234+ endif ()
226235
227236# ----------------------------------------------------------------------------------------#
228237#
Original file line number Diff line number Diff line change @@ -9,3 +9,4 @@ set(containers_sources ring_buffer.cpp record_header_buffer.cpp ring_buffer.cpp
99
1010target_sources (rocprofiler-sdk-common-library PRIVATE ${containers_sources}
1111 ${containers_headers} )
12+ target_link_libraries (rocprofiler-sdk-common-library PRIVATE rocprofiler-sdk-hip-nolink )
Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ target_link_libraries(
6767 rocprofiler-sdk::rocprofiler-sdk-cereal
6868 rocprofiler-sdk::rocprofiler-sdk-perfetto
6969 rocprofiler-sdk::rocprofiler-sdk-otf2
70+ rocprofiler-sdk-hip-nolink
7071 rocprofiler-sdk::rocprofiler-sdk-amd-comgr
7172 rocprofiler-sdk::rocprofiler-sdk-dw
7273 rocprofiler-sdk::rocprofiler-sdk-elf
You can’t perform that action at this time.
0 commit comments