CMake: Consistently name CMake Targets (#1082)
* Change all rocprofiler-X target names to rocprofiler-sdk-X * Update rocprofiler-sdk-config.cmake - fix install tree target names - simplify logic for using find w/ components and find w/o components * Update rocprofiler-sdk-roctx-config.cmake - simplify logic for using find w/ components and find w/o components * Update samples/intercept_table/CMakeLists.txt - demonstrate/test use of `find_package(rocprofiler-sdk ... COMPONENTS ...)`
This commit is contained in:
zatwierdzone przez
GitHub
rodzic
d93d4d9463
commit
74facf87a6
@@ -43,14 +43,6 @@ else()
|
||||
include("${@PACKAGE_NAME@_CMAKE_DIR}/@PACKAGE_NAME@-targets.cmake")
|
||||
|
||||
# Library dependencies
|
||||
foreach(TARG @PROJECT_BUILD_TARGETS@)
|
||||
set(TARG @PACKAGE_NAME@::${TARG})
|
||||
if(NOT @PACKAGE_NAME@_FIND_COMPONENTS)
|
||||
list(APPEND @PACKAGE_NAME@_LIBRARIES ${TARG})
|
||||
target_link_libraries(@PACKAGE_NAME@::@PACKAGE_NAME@ INTERFACE ${TARG})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if(@PACKAGE_NAME@_FIND_COMPONENTS)
|
||||
foreach(COMP ${@PACKAGE_NAME@_FIND_COMPONENTS})
|
||||
set(TARG @PACKAGE_NAME@::@PACKAGE_NAME@-${COMP})
|
||||
@@ -62,6 +54,12 @@ else()
|
||||
set(@PACKAGE_NAME@_${COMP}_FOUND 0)
|
||||
endif()
|
||||
endforeach()
|
||||
else()
|
||||
foreach(TARG @PROJECT_BUILD_TARGETS@)
|
||||
set(TARG @PACKAGE_NAME@::${TARG})
|
||||
list(APPEND @PACKAGE_NAME@_LIBRARIES ${TARG})
|
||||
target_link_libraries(@PACKAGE_NAME@::@PACKAGE_NAME@ INTERFACE ${TARG})
|
||||
endforeach()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
if(@PACKAGE_NAME@_FIND_COMPONENTS)
|
||||
foreach(COMP ${@PACKAGE_NAME@_FIND_COMPONENTS})
|
||||
set(TARG @PACKAGE_NAME@::@PROJECT_NAME@-${COMP})
|
||||
set(TARG @PACKAGE_NAME@::@PACKAGE_NAME@-${COMP})
|
||||
if(TARGET ${TARG})
|
||||
set(@PACKAGE_NAME@_${COMP}_FOUND 1)
|
||||
list(APPEND @PACKAGE_NAME@_LIBRARIES ${TARG})
|
||||
@@ -17,7 +17,7 @@ else()
|
||||
endif()
|
||||
|
||||
foreach(COMP @PROJECT_BUILD_TREE_TARGETS@)
|
||||
set(TARG @PACKAGE_NAME@::@PROJECT_NAME@-${COMP})
|
||||
set(TARG @PACKAGE_NAME@::@PACKAGE_NAME@-${COMP})
|
||||
if(TARGET ${TARG})
|
||||
list(APPEND @PACKAGE_NAME@_LIBRARIES ${TARG})
|
||||
target_link_libraries(@PACKAGE_NAME@::@PACKAGE_NAME@ INTERFACE ${TARG})
|
||||
|
||||
@@ -110,17 +110,9 @@ else()
|
||||
@PROJECT_NAME@_config_nolink_target(@PACKAGE_NAME@::@PACKAGE_NAME@-external-nolink amd_comgr)
|
||||
|
||||
# Library dependencies
|
||||
foreach(TARG @PROJECT_BUILD_TARGETS@)
|
||||
set(TARG @PACKAGE_NAME@::@PROJECT_NAME@-${TARG})
|
||||
if(NOT @PACKAGE_NAME@_FIND_COMPONENTS)
|
||||
list(APPEND @PACKAGE_NAME@_LIBRARIES ${TARG})
|
||||
target_link_libraries(@PACKAGE_NAME@::@PACKAGE_NAME@ INTERFACE ${TARG})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if(@PACKAGE_NAME@_FIND_COMPONENTS)
|
||||
foreach(COMP ${@PACKAGE_NAME@_FIND_COMPONENTS})
|
||||
set(TARG @PACKAGE_NAME@::${COMP})
|
||||
set(TARG @PACKAGE_NAME@::@PACKAGE_NAME@-${COMP})
|
||||
if(TARGET ${TARG})
|
||||
set(@PACKAGE_NAME@_${COMP}_FOUND 1)
|
||||
list(APPEND @PACKAGE_NAME@_LIBRARIES ${TARG})
|
||||
@@ -129,6 +121,12 @@ else()
|
||||
set(@PACKAGE_NAME@_${COMP}_FOUND 0)
|
||||
endif()
|
||||
endforeach()
|
||||
else()
|
||||
foreach(TARG @PROJECT_BUILD_TARGETS@)
|
||||
set(TARG @PACKAGE_NAME@::@PACKAGE_NAME@-${TARG})
|
||||
list(APPEND @PACKAGE_NAME@_LIBRARIES ${TARG})
|
||||
target_link_libraries(@PACKAGE_NAME@::@PACKAGE_NAME@ INTERFACE ${TARG})
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
target_link_libraries(@PACKAGE_NAME@::@PACKAGE_NAME@
|
||||
|
||||
@@ -11,15 +11,15 @@ include(FindPackageHandleStandardArgs)
|
||||
include(rocprofiler_compilers)
|
||||
include(rocprofiler_utilities)
|
||||
|
||||
target_compile_definitions(rocprofiler-build-flags INTERFACE $<$<CONFIG:DEBUG>:DEBUG>)
|
||||
target_compile_definitions(rocprofiler-sdk-build-flags INTERFACE $<$<CONFIG:DEBUG>:DEBUG>)
|
||||
|
||||
if(ROCPROFILER_BUILD_CI)
|
||||
rocprofiler_target_compile_definitions(rocprofiler-build-flags
|
||||
rocprofiler_target_compile_definitions(rocprofiler-sdk-build-flags
|
||||
INTERFACE ROCPROFILER_CI)
|
||||
endif()
|
||||
|
||||
if(ROCPROFILER_BUILD_CODECOV)
|
||||
target_link_libraries(rocprofiler-build-flags INTERFACE gcov)
|
||||
target_link_libraries(rocprofiler-sdk-build-flags INTERFACE gcov)
|
||||
endif()
|
||||
|
||||
# ----------------------------------------------------------------------------------------#
|
||||
@@ -38,32 +38,33 @@ foreach(_TYPE dl rt)
|
||||
find_package_handle_standard_args(${_TYPE}-library REQUIRED_VARS ${_TYPE}_LIBRARY)
|
||||
if(${_TYPE}-library_FOUND)
|
||||
string(TOUPPER "${_TYPE}" _TYPE_UC)
|
||||
rocprofiler_target_compile_definitions(rocprofiler-${_TYPE}
|
||||
rocprofiler_target_compile_definitions(rocprofiler-sdk-${_TYPE}
|
||||
INTERFACE ROCPROFILER_${_TYPE_UC}=1)
|
||||
target_link_libraries(rocprofiler-${_TYPE} INTERFACE ${${_TYPE}_LIBRARY})
|
||||
target_link_libraries(rocprofiler-sdk-${_TYPE} INTERFACE ${${_TYPE}_LIBRARY})
|
||||
if("${_TYPE}" STREQUAL "dl" AND NOT ROCPROFILER_ENABLE_CLANG_TIDY)
|
||||
# This instructs the linker to add all symbols, not only used ones, to the
|
||||
# dynamic symbol table. This option is needed for some uses of dlopen or
|
||||
# to allow obtaining backtraces from within a program.
|
||||
rocprofiler_target_compile_options(
|
||||
rocprofiler-${_TYPE}
|
||||
rocprofiler-sdk-${_TYPE}
|
||||
LANGUAGES C CXX
|
||||
LINK_LANGUAGES C CXX
|
||||
INTERFACE "-rdynamic")
|
||||
endif()
|
||||
else()
|
||||
rocprofiler_target_compile_definitions(rocprofiler-${_TYPE}
|
||||
rocprofiler_target_compile_definitions(rocprofiler-sdk-${_TYPE}
|
||||
INTERFACE ROCPROFILER_${_TYPE_UC}=0)
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
target_link_libraries(rocprofiler-build-flags INTERFACE rocprofiler-sdk::rocprofiler-dl)
|
||||
target_link_libraries(rocprofiler-sdk-build-flags
|
||||
INTERFACE rocprofiler-sdk::rocprofiler-sdk-dl)
|
||||
|
||||
# ----------------------------------------------------------------------------------------#
|
||||
# set the compiler flags
|
||||
#
|
||||
rocprofiler_target_compile_options(rocprofiler-build-flags
|
||||
rocprofiler_target_compile_options(rocprofiler-sdk-build-flags
|
||||
INTERFACE "-W" "-Wall" "-Wno-unknown-pragmas")
|
||||
|
||||
# compiler version specific flags
|
||||
@@ -71,7 +72,7 @@ function(set_compiler_options compiler_id version)
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL ${compiler_id} AND CMAKE_CXX_COMPILER_VERSION
|
||||
VERSION_LESS_EQUAL ${version})
|
||||
rocprofiler_target_compile_options(
|
||||
rocprofiler-build-flags
|
||||
rocprofiler-sdk-build-flags
|
||||
INTERFACE "-Wno-error=extra" "-Wno-unused-variable"
|
||||
"-Wno-error=unused-but-set-variable"
|
||||
"-Wno-error=unused-but-set-parameter" "-Wno-error=shadow")
|
||||
@@ -89,37 +90,37 @@ set_compiler_options("Clang" "13.0")
|
||||
#
|
||||
|
||||
rocprofiler_target_compile_options(
|
||||
rocprofiler-debug-flags INTERFACE "-g3" "-fno-omit-frame-pointer"
|
||||
"-fno-optimize-sibling-calls")
|
||||
rocprofiler-sdk-debug-flags INTERFACE "-g3" "-fno-omit-frame-pointer"
|
||||
"-fno-optimize-sibling-calls")
|
||||
|
||||
target_compile_options(
|
||||
rocprofiler-debug-flags
|
||||
rocprofiler-sdk-debug-flags
|
||||
INTERFACE $<$<COMPILE_LANGUAGE:C>:$<$<C_COMPILER_ID:GNU>:-rdynamic>>
|
||||
$<$<COMPILE_LANGUAGE:CXX>:$<$<CXX_COMPILER_ID:GNU>:-rdynamic>>)
|
||||
|
||||
if(NOT APPLE AND NOT ROCPROFILER_ENABLE_CLANG_TIDY)
|
||||
target_link_options(rocprofiler-debug-flags INTERFACE
|
||||
target_link_options(rocprofiler-sdk-debug-flags INTERFACE
|
||||
$<$<CXX_COMPILER_ID:GNU>:-rdynamic>)
|
||||
endif()
|
||||
|
||||
if(dl_LIBRARY)
|
||||
target_link_libraries(rocprofiler-debug-flags INTERFACE ${dl_LIBRARY})
|
||||
target_link_libraries(rocprofiler-sdk-debug-flags INTERFACE ${dl_LIBRARY})
|
||||
endif()
|
||||
|
||||
if(rt_LIBRARY)
|
||||
target_link_libraries(rocprofiler-debug-flags INTERFACE ${rt_LIBRARY})
|
||||
target_link_libraries(rocprofiler-sdk-debug-flags INTERFACE ${rt_LIBRARY})
|
||||
endif()
|
||||
|
||||
if(ROCPROFILER_BUILD_DEBUG)
|
||||
target_link_libraries(rocprofiler-build-flags
|
||||
INTERFACE rocprofiler-sdk::rocprofiler-debug-flags)
|
||||
target_link_libraries(rocprofiler-sdk-build-flags
|
||||
INTERFACE rocprofiler-sdk::rocprofiler-sdk-debug-flags)
|
||||
endif()
|
||||
|
||||
# ----------------------------------------------------------------------------------------#
|
||||
# debug-safe optimizations
|
||||
#
|
||||
rocprofiler_target_compile_options(
|
||||
rocprofiler-build-flags
|
||||
rocprofiler-sdk-build-flags
|
||||
LANGUAGES CXX
|
||||
INTERFACE "-faligned-new")
|
||||
|
||||
@@ -127,73 +128,73 @@ rocprofiler_target_compile_options(
|
||||
# fstack-protector
|
||||
#
|
||||
rocprofiler_target_compile_options(
|
||||
rocprofiler-stack-protector
|
||||
rocprofiler-sdk-stack-protector
|
||||
LANGUAGES C CXX
|
||||
INTERFACE "-fstack-protector-strong" "-Wstack-protector")
|
||||
|
||||
if(ROCPROFILER_BUILD_STACK_PROTECTOR)
|
||||
target_link_libraries(rocprofiler-build-flags
|
||||
INTERFACE rocprofiler-sdk::rocprofiler-stack-protector)
|
||||
target_link_libraries(rocprofiler-sdk-build-flags
|
||||
INTERFACE rocprofiler-sdk::rocprofiler-sdk-stack-protector)
|
||||
endif()
|
||||
|
||||
# ----------------------------------------------------------------------------------------#
|
||||
# developer build flags
|
||||
#
|
||||
rocprofiler_target_compile_options(
|
||||
rocprofiler-developer-flags
|
||||
rocprofiler-sdk-developer-flags
|
||||
LANGUAGES C CXX
|
||||
INTERFACE "-Werror" "-Wdouble-promotion" "-Wshadow" "-Wextra" "-Wvla")
|
||||
|
||||
if(ROCPROFILER_BUILD_DEVELOPER)
|
||||
target_link_libraries(rocprofiler-build-flags
|
||||
INTERFACE rocprofiler-sdk::rocprofiler-developer-flags)
|
||||
target_link_libraries(rocprofiler-sdk-build-flags
|
||||
INTERFACE rocprofiler-sdk::rocprofiler-sdk-developer-flags)
|
||||
endif()
|
||||
|
||||
# ----------------------------------------------------------------------------------------#
|
||||
# release build flags
|
||||
#
|
||||
rocprofiler_target_compile_options(
|
||||
rocprofiler-release-flags
|
||||
rocprofiler-sdk-release-flags
|
||||
LANGUAGES C CXX
|
||||
INTERFACE "-g1" "-feliminate-unused-debug-symbols" "-gno-column-info"
|
||||
"-gno-variable-location-views" "-gline-tables-only")
|
||||
|
||||
if(ROCPROFILER_BUILD_RELEASE)
|
||||
target_link_libraries(rocprofiler-build-flags
|
||||
INTERFACE rocprofiler-sdk::rocprofiler-release-flags)
|
||||
target_link_libraries(rocprofiler-sdk-build-flags
|
||||
INTERFACE rocprofiler-sdk::rocprofiler-sdk-release-flags)
|
||||
endif()
|
||||
|
||||
# ----------------------------------------------------------------------------------------#
|
||||
# static lib flags
|
||||
#
|
||||
target_compile_options(
|
||||
rocprofiler-static-libgcc
|
||||
rocprofiler-sdk-static-libgcc
|
||||
INTERFACE $<$<COMPILE_LANGUAGE:C>:$<$<C_COMPILER_ID:GNU>:-static-libgcc>>
|
||||
$<$<COMPILE_LANGUAGE:CXX>:$<$<CXX_COMPILER_ID:GNU>:-static-libgcc>>)
|
||||
target_link_options(
|
||||
rocprofiler-static-libgcc INTERFACE
|
||||
rocprofiler-sdk-static-libgcc INTERFACE
|
||||
$<$<COMPILE_LANGUAGE:C>:$<$<C_COMPILER_ID:GNU,Clang>:-static-libgcc>>
|
||||
$<$<COMPILE_LANGUAGE:CXX>:$<$<CXX_COMPILER_ID:GNU,Clang>:-static-libgcc>>)
|
||||
|
||||
target_compile_options(
|
||||
rocprofiler-static-libstdcxx
|
||||
rocprofiler-sdk-static-libstdcxx
|
||||
INTERFACE $<$<COMPILE_LANGUAGE:CXX>:$<$<CXX_COMPILER_ID:GNU>:-static-libstdc++>>)
|
||||
target_link_options(
|
||||
rocprofiler-static-libstdcxx INTERFACE
|
||||
rocprofiler-sdk-static-libstdcxx INTERFACE
|
||||
$<$<COMPILE_LANGUAGE:CXX>:$<$<CXX_COMPILER_ID:GNU,Clang>:-static-libstdc++>>)
|
||||
|
||||
if(ROCPROFILER_BUILD_STATIC_LIBGCC)
|
||||
target_link_libraries(rocprofiler-build-flags
|
||||
INTERFACE rocprofiler-sdk::rocprofiler-static-libgcc)
|
||||
target_link_libraries(rocprofiler-sdk-build-flags
|
||||
INTERFACE rocprofiler-sdk::rocprofiler-sdk-static-libgcc)
|
||||
endif()
|
||||
|
||||
if(ROCPROFILER_BUILD_STATIC_LIBSTDCXX)
|
||||
target_link_libraries(rocprofiler-build-flags
|
||||
INTERFACE rocprofiler-sdk::rocprofiler-static-libstdcxx)
|
||||
target_link_libraries(rocprofiler-sdk-build-flags
|
||||
INTERFACE rocprofiler-sdk::rocprofiler-sdk-static-libstdcxx)
|
||||
endif()
|
||||
|
||||
if(ROCPROFILER_UNSAFE_NO_VERSION_CHECK)
|
||||
rocprofiler_target_compile_definitions(rocprofiler-build-flags
|
||||
rocprofiler_target_compile_definitions(rocprofiler-sdk-build-flags
|
||||
INTERFACE ROCPROFILER_UNSAFE_NO_VERSION_CHECK)
|
||||
endif()
|
||||
|
||||
@@ -203,5 +204,5 @@ endif()
|
||||
get_property(LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES)
|
||||
|
||||
if(NOT APPLE OR "$ENV{CONDA_PYTHON_EXE}" STREQUAL "")
|
||||
rocprofiler_target_user_flags(rocprofiler-build-flags "CXX")
|
||||
rocprofiler_target_user_flags(rocprofiler-sdk-build-flags "CXX")
|
||||
endif()
|
||||
|
||||
@@ -59,9 +59,9 @@ set(${PACKAGE_NAME}_BUILD_TREE
|
||||
|
||||
set(PROJECT_BUILD_TREE_TARGETS
|
||||
${SDK_PACKAGE_NAME}::${PACKAGE_NAME}-shared-library
|
||||
${SDK_PACKAGE_NAME}::${PROJECT_NAME}-headers
|
||||
${SDK_PACKAGE_NAME}::${PROJECT_NAME}-build-flags
|
||||
${SDK_PACKAGE_NAME}::${PROJECT_NAME}-stack-protector)
|
||||
${SDK_PACKAGE_NAME}::${SDK_PACKAGE_NAME}-headers
|
||||
${SDK_PACKAGE_NAME}::${SDK_PACKAGE_NAME}-build-flags
|
||||
${SDK_PACKAGE_NAME}::${SDK_PACKAGE_NAME}-stack-protector)
|
||||
|
||||
configure_file(
|
||||
${PROJECT_SOURCE_DIR}/cmake/Templates/${PACKAGE_NAME}/build-config.cmake.in
|
||||
|
||||
@@ -10,15 +10,15 @@ include(rocprofiler_config_nolink_target)
|
||||
# ########################################################################################
|
||||
|
||||
target_include_directories(
|
||||
rocprofiler-headers
|
||||
rocprofiler-sdk-headers
|
||||
INTERFACE $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/source/include>
|
||||
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/source/include>
|
||||
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/source>
|
||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
|
||||
|
||||
target_compile_definitions(
|
||||
rocprofiler-headers INTERFACE $<BUILD_INTERFACE:AMD_INTERNAL_BUILD=1>
|
||||
$<BUILD_INTERFACE:__HIP_PLATFORM_AMD__=1>)
|
||||
rocprofiler-sdk-headers INTERFACE $<BUILD_INTERFACE:AMD_INTERNAL_BUILD=1>
|
||||
$<BUILD_INTERFACE:__HIP_PLATFORM_AMD__=1>)
|
||||
|
||||
# ensure the env overrides the appending /opt/rocm later
|
||||
string(REPLACE ":" ";" CMAKE_PREFIX_PATH "$ENV{CMAKE_PREFIX_PATH};${CMAKE_PREFIX_PATH}")
|
||||
@@ -55,12 +55,12 @@ find_library(pthread_LIBRARY NAMES pthread pthreads)
|
||||
find_package_handle_standard_args(pthread-library REQUIRED_VARS pthread_LIBRARY)
|
||||
|
||||
if(pthread_LIBRARY)
|
||||
target_link_libraries(rocprofiler-threading INTERFACE ${pthread_LIBRARY})
|
||||
target_link_libraries(rocprofiler-sdk-threading INTERFACE ${pthread_LIBRARY})
|
||||
else()
|
||||
find_package(Threads ${rocprofiler_FIND_QUIETLY} ${rocprofiler_FIND_REQUIREMENT})
|
||||
|
||||
if(Threads_FOUND)
|
||||
target_link_libraries(rocprofiler-threading INTERFACE Threads::Threads)
|
||||
target_link_libraries(rocprofiler-sdk-threading INTERFACE Threads::Threads)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -75,7 +75,7 @@ foreach(_LIB dl rt)
|
||||
find_package_handle_standard_args(${_LIB}-library REQUIRED_VARS ${_LIB}_LIBRARY)
|
||||
|
||||
if(${_LIB}_LIBRARY)
|
||||
target_link_libraries(rocprofiler-threading INTERFACE ${${_LIB}_LIBRARY})
|
||||
target_link_libraries(rocprofiler-sdk-threading INTERFACE ${${_LIB}_LIBRARY})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
@@ -85,7 +85,7 @@ endforeach()
|
||||
#
|
||||
# ----------------------------------------------------------------------------------------#
|
||||
|
||||
target_link_libraries(rocprofiler-atomic INTERFACE atomic)
|
||||
target_link_libraries(rocprofiler-sdk-atomic INTERFACE atomic)
|
||||
|
||||
# ----------------------------------------------------------------------------------------#
|
||||
#
|
||||
@@ -95,9 +95,9 @@ target_link_libraries(rocprofiler-atomic INTERFACE atomic)
|
||||
|
||||
if(NOT ROCPROFILER_BUILD_GHC_FS)
|
||||
if(CMAKE_CXX_COMPILER_IS_GNU AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.1)
|
||||
target_link_libraries(rocprofiler-cxx-filesystem INTERFACE stdc++fs)
|
||||
target_link_libraries(rocprofiler-sdk-cxx-filesystem INTERFACE stdc++fs)
|
||||
elseif(CMAKE_CXX_COMPILER_IS_CLANG AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0)
|
||||
target_link_libraries(rocprofiler-cxx-filesystem INTERFACE c++fs)
|
||||
target_link_libraries(rocprofiler-sdk-cxx-filesystem INTERFACE c++fs)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -126,8 +126,8 @@ find_package(
|
||||
PATHS
|
||||
${rocm_version_DIR}
|
||||
${ROCM_PATH})
|
||||
target_link_libraries(rocprofiler-hip INTERFACE hip::host)
|
||||
rocprofiler_config_nolink_target(rocprofiler-hip-nolink hip::host)
|
||||
target_link_libraries(rocprofiler-sdk-hip INTERFACE hip::host)
|
||||
rocprofiler_config_nolink_target(rocprofiler-sdk-hip-nolink hip::host)
|
||||
|
||||
# ----------------------------------------------------------------------------------------#
|
||||
#
|
||||
@@ -153,11 +153,11 @@ string(REPLACE "." ";" HSA_RUNTIME_VERSION "${hsa-runtime64_VERSION}")
|
||||
list(GET HSA_RUNTIME_VERSION 0 HSA_RUNTIME_VERSION_MAJOR)
|
||||
list(GET HSA_RUNTIME_VERSION 1 HSA_RUNTIME_VERSION_MINOR)
|
||||
|
||||
target_link_libraries(rocprofiler-hsa-runtime INTERFACE hsa-runtime64::hsa-runtime64)
|
||||
rocprofiler_config_nolink_target(rocprofiler-hsa-runtime-nolink
|
||||
target_link_libraries(rocprofiler-sdk-hsa-runtime INTERFACE hsa-runtime64::hsa-runtime64)
|
||||
rocprofiler_config_nolink_target(rocprofiler-sdk-hsa-runtime-nolink
|
||||
hsa-runtime64::hsa-runtime64)
|
||||
|
||||
rocprofiler_parse_hsa_api_table_versions(rocprofiler-hsa-runtime-nolink)
|
||||
rocprofiler_parse_hsa_api_table_versions(rocprofiler-sdk-hsa-runtime-nolink)
|
||||
|
||||
# ----------------------------------------------------------------------------------------#
|
||||
#
|
||||
@@ -178,7 +178,7 @@ find_package(
|
||||
PATH_SUFFIXES
|
||||
lib/cmake/amd_comgr)
|
||||
|
||||
target_link_libraries(rocprofiler-amd-comgr INTERFACE amd_comgr)
|
||||
target_link_libraries(rocprofiler-sdk-amd-comgr INTERFACE amd_comgr)
|
||||
|
||||
# ----------------------------------------------------------------------------------------#
|
||||
#
|
||||
@@ -186,7 +186,7 @@ target_link_libraries(rocprofiler-amd-comgr INTERFACE amd_comgr)
|
||||
#
|
||||
# ----------------------------------------------------------------------------------------#
|
||||
|
||||
target_link_libraries(rocprofiler-ptl INTERFACE PTL::ptl-static)
|
||||
target_link_libraries(rocprofiler-sdk-ptl INTERFACE PTL::ptl-static)
|
||||
|
||||
# ----------------------------------------------------------------------------------------#
|
||||
#
|
||||
@@ -195,7 +195,7 @@ target_link_libraries(rocprofiler-ptl INTERFACE PTL::ptl-static)
|
||||
# ----------------------------------------------------------------------------------------#
|
||||
|
||||
find_package(libelf REQUIRED)
|
||||
target_link_libraries(rocprofiler-elf INTERFACE libelf::libelf)
|
||||
target_link_libraries(rocprofiler-sdk-elf INTERFACE libelf::libelf)
|
||||
|
||||
# ----------------------------------------------------------------------------------------#
|
||||
#
|
||||
@@ -204,7 +204,7 @@ target_link_libraries(rocprofiler-elf INTERFACE libelf::libelf)
|
||||
# ----------------------------------------------------------------------------------------#
|
||||
|
||||
find_package(libdw REQUIRED)
|
||||
target_link_libraries(rocprofiler-dw INTERFACE libdw::libdw)
|
||||
target_link_libraries(rocprofiler-sdk-dw INTERFACE libdw::libdw)
|
||||
|
||||
# ----------------------------------------------------------------------------------------#
|
||||
#
|
||||
@@ -218,7 +218,7 @@ find_library(
|
||||
HINTS ${rocm_version_DIR} ${ROCM_PATH}
|
||||
PATHS ${rocm_version_DIR} ${ROCM_PATH})
|
||||
|
||||
target_link_libraries(rocprofiler-hsa-aql INTERFACE ${hsa-amd-aqlprofile64_library})
|
||||
target_link_libraries(rocprofiler-sdk-hsa-aql INTERFACE ${hsa-amd-aqlprofile64_library})
|
||||
|
||||
# ----------------------------------------------------------------------------------------#
|
||||
#
|
||||
@@ -239,8 +239,8 @@ find_package(
|
||||
PATH_SUFFIXES
|
||||
lib/cmake/hsakmt)
|
||||
|
||||
target_link_libraries(rocprofiler-hsakmt INTERFACE hsakmt::hsakmt)
|
||||
rocprofiler_config_nolink_target(rocprofiler-hsakmt-nolink hsakmt::hsakmt)
|
||||
target_link_libraries(rocprofiler-sdk-hsakmt INTERFACE hsakmt::hsakmt)
|
||||
rocprofiler_config_nolink_target(rocprofiler-sdk-hsakmt-nolink hsakmt::hsakmt)
|
||||
|
||||
# ----------------------------------------------------------------------------------------#
|
||||
#
|
||||
@@ -274,9 +274,9 @@ find_library(
|
||||
HINTS ${rocm_version_DIR} ${ROCM_PATH} /opt/amdgpu
|
||||
PATHS ${rocm_version_DIR} ${ROCM_PATH} /opt/amdgpu REQUIRED)
|
||||
|
||||
target_include_directories(rocprofiler-drm SYSTEM INTERFACE ${drm_INCLUDE_DIR}
|
||||
${xf86drm_INCLUDE_DIR})
|
||||
target_link_libraries(rocprofiler-drm INTERFACE ${drm_LIBRARY} ${drm_amdgpu_LIBRARY})
|
||||
target_include_directories(rocprofiler-sdk-drm SYSTEM INTERFACE ${drm_INCLUDE_DIR}
|
||||
${xf86drm_INCLUDE_DIR})
|
||||
target_link_libraries(rocprofiler-sdk-drm INTERFACE ${drm_LIBRARY} ${drm_amdgpu_LIBRARY})
|
||||
|
||||
# ----------------------------------------------------------------------------------------#
|
||||
#
|
||||
@@ -285,8 +285,8 @@ target_link_libraries(rocprofiler-drm INTERFACE ${drm_LIBRARY} ${drm_amdgpu_LIBR
|
||||
# ----------------------------------------------------------------------------------------#
|
||||
|
||||
# get_target_property(ELFIO_INCLUDE_DIR elfio::elfio INTERFACE_INCLUDE_DIRECTORIES)
|
||||
# target_include_directories(rocprofiler-elfio SYSTEM INTERFACE ${ELFIO_INCLUDE_DIR})
|
||||
target_link_libraries(rocprofiler-elfio INTERFACE elfio::elfio)
|
||||
# target_include_directories(rocprofiler-sdk-elfio SYSTEM INTERFACE ${ELFIO_INCLUDE_DIR})
|
||||
target_link_libraries(rocprofiler-sdk-elfio INTERFACE elfio::elfio)
|
||||
|
||||
# ----------------------------------------------------------------------------------------#
|
||||
#
|
||||
@@ -294,7 +294,7 @@ target_link_libraries(rocprofiler-elfio INTERFACE elfio::elfio)
|
||||
#
|
||||
# ----------------------------------------------------------------------------------------#
|
||||
|
||||
target_link_libraries(rocprofiler-otf2 INTERFACE otf2::otf2)
|
||||
target_link_libraries(rocprofiler-sdk-otf2 INTERFACE otf2::otf2)
|
||||
|
||||
# ----------------------------------------------------------------------------------------#
|
||||
#
|
||||
@@ -318,10 +318,10 @@ if(rccl_FOUND
|
||||
AND rccl_INCLUDE_DIR
|
||||
AND EXISTS "${rccl_INCLUDE_DIR}/rccl/amd_detail/api_trace.h")
|
||||
set(rccl_API_TRACE_FOUND ON)
|
||||
rocprofiler_config_nolink_target(rocprofiler-rccl-nolink rccl::rccl)
|
||||
rocprofiler_config_nolink_target(rocprofiler-sdk-rccl-nolink rccl::rccl)
|
||||
else()
|
||||
set(rccl_API_TRACE_FOUND OFF)
|
||||
target_compile_definitions(rocprofiler-rccl-nolink
|
||||
target_compile_definitions(rocprofiler-sdk-rccl-nolink
|
||||
INTERFACE ROCPROFILER_SDK_USE_SYSTEM_RCCL=0)
|
||||
|
||||
endif()
|
||||
|
||||
@@ -10,77 +10,83 @@ include(rocprofiler_utilities)
|
||||
# interfaces for build flags
|
||||
#
|
||||
rocprofiler_add_interface_library(
|
||||
rocprofiler-headers
|
||||
rocprofiler-sdk-headers
|
||||
"Provides minimal set of include flags to compile with rocprofiler")
|
||||
rocprofiler_add_interface_library(
|
||||
rocprofiler-build-flags "Provides generalized build flags for rocprofiler" INTERNAL)
|
||||
rocprofiler_add_interface_library(rocprofiler-threading "Enables multithreading support"
|
||||
rocprofiler-sdk-build-flags "Provides generalized build flags for rocprofiler"
|
||||
INTERNAL)
|
||||
rocprofiler_add_interface_library(rocprofiler-sdk-threading
|
||||
"Enables multithreading support" INTERNAL)
|
||||
rocprofiler_add_interface_library(rocprofiler-sdk-perfetto "Enables Perfetto support"
|
||||
INTERNAL)
|
||||
rocprofiler_add_interface_library(rocprofiler-perfetto "Enables Perfetto support"
|
||||
rocprofiler_add_interface_library(rocprofiler-sdk-otf2 "Enables OTF2 support" INTERNAL)
|
||||
rocprofiler_add_interface_library(rocprofiler-sdk-cereal "Enables Cereal support"
|
||||
INTERNAL)
|
||||
rocprofiler_add_interface_library(rocprofiler-otf2 "Enables OTF2 support" INTERNAL)
|
||||
rocprofiler_add_interface_library(rocprofiler-cereal "Enables Cereal support" INTERNAL)
|
||||
rocprofiler_add_interface_library(rocprofiler-compile-definitions "Compile definitions"
|
||||
INTERNAL)
|
||||
rocprofiler_add_interface_library(rocprofiler-static-libgcc
|
||||
rocprofiler_add_interface_library(rocprofiler-sdk-compile-definitions
|
||||
"Compile definitions" INTERNAL)
|
||||
rocprofiler_add_interface_library(rocprofiler-sdk-static-libgcc
|
||||
"Link to static version of libgcc" INTERNAL)
|
||||
rocprofiler_add_interface_library(rocprofiler-static-libstdcxx
|
||||
rocprofiler_add_interface_library(rocprofiler-sdk-static-libstdcxx
|
||||
"Link to static version of libstdc++" INTERNAL)
|
||||
rocprofiler_add_interface_library(
|
||||
rocprofiler-developer-flags "Compiler flags for developers (more warnings, etc.)"
|
||||
rocprofiler-sdk-developer-flags "Compiler flags for developers (more warnings, etc.)"
|
||||
INTERNAL)
|
||||
rocprofiler_add_interface_library(rocprofiler-debug-flags
|
||||
rocprofiler_add_interface_library(rocprofiler-sdk-debug-flags
|
||||
"Compiler flags for more debug info" INTERNAL)
|
||||
rocprofiler_add_interface_library(rocprofiler-release-flags
|
||||
rocprofiler_add_interface_library(rocprofiler-sdk-release-flags
|
||||
"Compiler flags for more debug info" INTERNAL)
|
||||
rocprofiler_add_interface_library(rocprofiler-stack-protector
|
||||
rocprofiler_add_interface_library(rocprofiler-sdk-stack-protector
|
||||
"Adds stack-protector compiler flags" INTERNAL)
|
||||
rocprofiler_add_interface_library(rocprofiler-memcheck INTERFACE INTERNAL)
|
||||
rocprofiler_add_interface_library(rocprofiler-sdk-memcheck INTERFACE INTERNAL)
|
||||
|
||||
#
|
||||
# interfaces for libraries (general)
|
||||
#
|
||||
rocprofiler_add_interface_library(rocprofiler-dl
|
||||
rocprofiler_add_interface_library(rocprofiler-sdk-dl
|
||||
"Build flags for dynamic linking library" INTERNAL)
|
||||
rocprofiler_add_interface_library(rocprofiler-rt "Build flags for runtime library"
|
||||
rocprofiler_add_interface_library(rocprofiler-sdk-rt "Build flags for runtime library"
|
||||
INTERNAL)
|
||||
rocprofiler_add_interface_library(rocprofiler-atomic "atomic library" INTERNAL)
|
||||
rocprofiler_add_interface_library(rocprofiler-gtest "Google Test library" INTERNAL)
|
||||
rocprofiler_add_interface_library(rocprofiler-glog "Google Log library" INTERNAL)
|
||||
rocprofiler_add_interface_library(rocprofiler-fmt "C++ format string library" INTERNAL)
|
||||
rocprofiler_add_interface_library(rocprofiler-cxx-filesystem "C++ filesystem library"
|
||||
rocprofiler_add_interface_library(rocprofiler-sdk-atomic "atomic library" INTERNAL)
|
||||
rocprofiler_add_interface_library(rocprofiler-sdk-gtest "Google Test library" INTERNAL)
|
||||
rocprofiler_add_interface_library(rocprofiler-sdk-glog "Google Log library" INTERNAL)
|
||||
rocprofiler_add_interface_library(rocprofiler-sdk-fmt "C++ format string library"
|
||||
INTERNAL)
|
||||
rocprofiler_add_interface_library(rocprofiler-ptl "Parallel Tasking Library" INTERNAL)
|
||||
rocprofiler_add_interface_library(rocprofiler-elf "ElfUtils elf library" INTERNAL)
|
||||
rocprofiler_add_interface_library(rocprofiler-dw "ElfUtils dw library" INTERNAL)
|
||||
rocprofiler_add_interface_library(rocprofiler-elfio "ELFIO header-only C++ library"
|
||||
rocprofiler_add_interface_library(rocprofiler-sdk-cxx-filesystem "C++ filesystem library"
|
||||
INTERNAL)
|
||||
rocprofiler_add_interface_library(rocprofiler-yaml-cpp "YAML CPP Parser" INTERNAL)
|
||||
rocprofiler_add_interface_library(rocprofiler-sdk-ptl "Parallel Tasking Library" INTERNAL)
|
||||
rocprofiler_add_interface_library(rocprofiler-sdk-elf "ElfUtils elf library" INTERNAL)
|
||||
rocprofiler_add_interface_library(rocprofiler-sdk-dw "ElfUtils dw library" INTERNAL)
|
||||
rocprofiler_add_interface_library(rocprofiler-sdk-elfio "ELFIO header-only C++ library"
|
||||
INTERNAL)
|
||||
rocprofiler_add_interface_library(rocprofiler-sdk-yaml-cpp "YAML CPP Parser" INTERNAL)
|
||||
|
||||
#
|
||||
# interface for libraries (ROCm-specific)
|
||||
#
|
||||
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-amd-comgr "AMD comgr library" INTERNAL)
|
||||
rocprofiler_add_interface_library(rocprofiler-hsa-aql "AQL library" INTERNAL)
|
||||
rocprofiler_add_interface_library(rocprofiler-hsakmt "HSAKMT library for AMD KFD support"
|
||||
rocprofiler_add_interface_library(rocprofiler-sdk-hip "HIP library" INTERNAL)
|
||||
rocprofiler_add_interface_library(rocprofiler-sdk-hsa-runtime "HSA runtime library"
|
||||
INTERNAL)
|
||||
rocprofiler_add_interface_library(rocprofiler-drm "drm (amdgpu) library" INTERNAL)
|
||||
rocprofiler_add_interface_library(rocprofiler-sdk-amd-comgr "AMD comgr library" INTERNAL)
|
||||
rocprofiler_add_interface_library(rocprofiler-sdk-hsa-aql "AQL library" INTERNAL)
|
||||
rocprofiler_add_interface_library(rocprofiler-sdk-hsakmt
|
||||
"HSAKMT library for AMD KFD support" INTERNAL)
|
||||
rocprofiler_add_interface_library(rocprofiler-sdk-drm "drm (amdgpu) library" INTERNAL)
|
||||
|
||||
#
|
||||
# "nolink" interface targets emulate another interface target but do not link to the
|
||||
# library. E.g. rocprofiler-hip-nolink has the include directories, compile definitions,
|
||||
# and compile options of rocprofiler-hip but does not link to the HIP runtime library
|
||||
# library. E.g. rocprofiler-sdk-hip-nolink has the include directories, compile
|
||||
# definitions, and compile options of rocprofiler-sdk-hip but does not link to the HIP
|
||||
# runtime library
|
||||
#
|
||||
|
||||
rocprofiler_add_interface_library(
|
||||
rocprofiler-hip-nolink "rocprofiler-hip without linking to HIP library" IMPORTED)
|
||||
rocprofiler_add_interface_library(
|
||||
rocprofiler-hsa-runtime-nolink
|
||||
"rocprofiler-hsa-runtime without linking to HSA library" IMPORTED)
|
||||
rocprofiler_add_interface_library(
|
||||
rocprofiler-hsakmt-nolink "rocprofiler-hsakmt without linking to HSAKMT library"
|
||||
rocprofiler-sdk-hip-nolink "rocprofiler-sdk-hip without linking to HIP library"
|
||||
IMPORTED)
|
||||
rocprofiler_add_interface_library(rocprofiler-rccl-nolink
|
||||
rocprofiler_add_interface_library(
|
||||
rocprofiler-sdk-hsa-runtime-nolink
|
||||
"rocprofiler-sdk-hsa-runtime without linking to HSA library" IMPORTED)
|
||||
rocprofiler_add_interface_library(
|
||||
rocprofiler-sdk-hsakmt-nolink
|
||||
"rocprofiler-sdk-hsakmt without linking to HSAKMT library" IMPORTED)
|
||||
rocprofiler_add_interface_library(rocprofiler-sdk-rccl-nolink
|
||||
"RCCL headers without linking to RCCL library" IMPORTED)
|
||||
|
||||
@@ -15,10 +15,10 @@ set_property(CACHE ROCPROFILER_MEMCHECK PROPERTY STRINGS "${ROCPROFILER_MEMCHECK
|
||||
|
||||
function(rocprofiler_add_memcheck_flags _TYPE _FLAG _LIB_BASE)
|
||||
target_compile_options(
|
||||
rocprofiler-memcheck
|
||||
rocprofiler-sdk-memcheck
|
||||
INTERFACE $<BUILD_INTERFACE:-g3 -Og -fno-omit-frame-pointer
|
||||
-fno-optimize-sibling-calls -fno-inline-functions -fsanitize=${_FLAG}>)
|
||||
target_link_options(rocprofiler-memcheck INTERFACE
|
||||
target_link_options(rocprofiler-sdk-memcheck INTERFACE
|
||||
$<BUILD_INTERFACE:-fsanitize=${_FLAG} -Wl,--no-undefined>)
|
||||
|
||||
if(NOT EXISTS ${PROJECT_BINARY_DIR}/CMakeFiles/CMakeTmp)
|
||||
@@ -60,7 +60,7 @@ function(rocprofiler_set_memcheck_env _TYPE _LIB_BASE)
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
target_link_libraries(rocprofiler-memcheck INTERFACE ${_LIB_BASE})
|
||||
target_link_libraries(rocprofiler-sdk-memcheck INTERFACE ${_LIB_BASE})
|
||||
|
||||
if(${_TYPE}_LIBRARY)
|
||||
set(ROCPROFILER_MEMCHECK_PRELOAD_ENV
|
||||
|
||||
Vendored
+26
-24
@@ -24,10 +24,10 @@ if(ROCPROFILER_BUILD_GHC_FS)
|
||||
REPO_BRANCH "v1.5.14")
|
||||
|
||||
target_compile_definitions(
|
||||
rocprofiler-cxx-filesystem
|
||||
rocprofiler-sdk-cxx-filesystem
|
||||
INTERFACE $<BUILD_INTERFACE:ROCPROFILER_HAS_GHC_LIB_FILESYSTEM=1>)
|
||||
target_include_directories(
|
||||
rocprofiler-cxx-filesystem SYSTEM
|
||||
rocprofiler-sdk-cxx-filesystem SYSTEM
|
||||
INTERFACE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/external/filesystem/include>)
|
||||
endif()
|
||||
|
||||
@@ -50,9 +50,9 @@ if(ROCPROFILER_BUILD_TESTS)
|
||||
message(FATAL_ERROR "missing GTest::gtest")
|
||||
endif()
|
||||
|
||||
target_link_libraries(rocprofiler-gtest INTERFACE GTest::gtest)
|
||||
target_link_libraries(rocprofiler-sdk-gtest INTERFACE GTest::gtest)
|
||||
target_include_directories(
|
||||
rocprofiler-gtest SYSTEM
|
||||
rocprofiler-sdk-gtest SYSTEM
|
||||
INTERFACE ${CMAKE_CURRENT_LIST_DIR}/googletest/googletest/include)
|
||||
|
||||
mark_as_advanced(INSTALL_GTEST)
|
||||
@@ -60,7 +60,7 @@ if(ROCPROFILER_BUILD_TESTS)
|
||||
mark_as_advanced(GTEST_HAS_ABSL)
|
||||
else()
|
||||
find_package(GTest REQUIRED)
|
||||
target_link_libraries(rocprofiler-gtest INTERFACE GTest::gtest)
|
||||
target_link_libraries(rocprofiler-sdk-gtest INTERFACE GTest::gtest)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -79,14 +79,14 @@ if(ROCPROFILER_BUILD_GLOG)
|
||||
set(WITH_UNWIND "none")
|
||||
add_subdirectory(glog EXCLUDE_FROM_ALL)
|
||||
|
||||
target_link_libraries(rocprofiler-glog INTERFACE $<BUILD_INTERFACE:glog::glog>)
|
||||
target_link_libraries(rocprofiler-sdk-glog INTERFACE $<BUILD_INTERFACE:glog::glog>)
|
||||
target_include_directories(
|
||||
rocprofiler-glog SYSTEM
|
||||
rocprofiler-sdk-glog SYSTEM
|
||||
INTERFACE $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/external/glog>
|
||||
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/external/glog/src>)
|
||||
else()
|
||||
find_package(glog REQUIRED)
|
||||
target_link_libraries(rocprofiler-glog INTERFACE glog::glog)
|
||||
target_link_libraries(rocprofiler-sdk-glog INTERFACE glog::glog)
|
||||
endif()
|
||||
|
||||
if(ROCPROFILER_BUILD_FMT)
|
||||
@@ -101,13 +101,13 @@ if(ROCPROFILER_BUILD_FMT)
|
||||
set(FMT_TEST OFF)
|
||||
add_subdirectory(fmt EXCLUDE_FROM_ALL)
|
||||
|
||||
target_link_libraries(rocprofiler-fmt INTERFACE $<BUILD_INTERFACE:fmt::fmt>)
|
||||
target_link_libraries(rocprofiler-sdk-fmt INTERFACE $<BUILD_INTERFACE:fmt::fmt>)
|
||||
target_include_directories(
|
||||
rocprofiler-fmt SYSTEM
|
||||
rocprofiler-sdk-fmt SYSTEM
|
||||
INTERFACE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/external/fmt/include>)
|
||||
else()
|
||||
find_package(fmt REQUIRED)
|
||||
target_link_libraries(rocprofiler-fmt INTERFACE fmt::fmt)
|
||||
target_link_libraries(rocprofiler-sdk-fmt INTERFACE fmt::fmt)
|
||||
endif()
|
||||
|
||||
if(NOT TARGET PTL::ptl-static)
|
||||
@@ -135,10 +135,10 @@ rocprofiler_checkout_git_submodule(
|
||||
|
||||
add_subdirectory(yaml-cpp EXCLUDE_FROM_ALL)
|
||||
|
||||
target_link_libraries(rocprofiler-yaml-cpp
|
||||
target_link_libraries(rocprofiler-sdk-yaml-cpp
|
||||
INTERFACE $<BUILD_INTERFACE:yaml-cpp::yaml-cpp>)
|
||||
target_include_directories(
|
||||
rocprofiler-yaml-cpp
|
||||
rocprofiler-sdk-yaml-cpp
|
||||
INTERFACE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/external/yaml-cpp/include>)
|
||||
|
||||
# checkout submodule if not already checked out or clone repo if no .gitmodules file
|
||||
@@ -149,10 +149,10 @@ rocprofiler_checkout_git_submodule(
|
||||
REPO_URL https://github.com/jrmadsen/cereal.git
|
||||
REPO_BRANCH "rocprofiler")
|
||||
|
||||
target_compile_definitions(rocprofiler-cereal
|
||||
target_compile_definitions(rocprofiler-sdk-cereal
|
||||
INTERFACE $<BUILD_INTERFACE:CEREAL_THREAD_SAFE=1>)
|
||||
target_include_directories(
|
||||
rocprofiler-cereal
|
||||
rocprofiler-sdk-cereal
|
||||
INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/cereal/include>)
|
||||
|
||||
# doxygen-awesome
|
||||
@@ -175,19 +175,20 @@ rocprofiler_checkout_git_submodule(
|
||||
REPO_URL https://android.googlesource.com/platform/external/perfetto external/perfetto
|
||||
REPO_BRANCH "v44.0")
|
||||
|
||||
add_library(rocprofiler-perfetto-static-library STATIC)
|
||||
add_library(rocprofiler-sdk-perfetto-static-library STATIC)
|
||||
target_sources(
|
||||
rocprofiler-perfetto-static-library
|
||||
rocprofiler-sdk-perfetto-static-library
|
||||
PRIVATE ${PROJECT_SOURCE_DIR}/external/perfetto/sdk/perfetto.h
|
||||
${PROJECT_SOURCE_DIR}/external/perfetto/sdk/perfetto.cc)
|
||||
target_include_directories(
|
||||
rocprofiler-perfetto-static-library SYSTEM
|
||||
rocprofiler-sdk-perfetto-static-library SYSTEM
|
||||
INTERFACE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/external/perfetto/sdk>)
|
||||
set_target_properties(
|
||||
rocprofiler-perfetto-static-library PROPERTIES POSITION_INDEPENDENT_CODE ON
|
||||
OUTPUT_NAME rocprofiler-sdk-perfetto)
|
||||
target_link_libraries(rocprofiler-perfetto
|
||||
INTERFACE $<BUILD_INTERFACE:rocprofiler-perfetto-static-library>)
|
||||
rocprofiler-sdk-perfetto-static-library
|
||||
PROPERTIES POSITION_INDEPENDENT_CODE ON OUTPUT_NAME rocprofiler-sdk-perfetto)
|
||||
target_link_libraries(
|
||||
rocprofiler-sdk-perfetto
|
||||
INTERFACE $<BUILD_INTERFACE:rocprofiler-sdk-perfetto-static-library>)
|
||||
|
||||
# ELFIO
|
||||
rocprofiler_checkout_git_submodule(
|
||||
@@ -200,9 +201,10 @@ rocprofiler_checkout_git_submodule(
|
||||
set(ELFIO_BUILD_EXAMPLES OFF)
|
||||
set(ELFIO_BUILD_TESTS OFF)
|
||||
add_subdirectory(elfio EXCLUDE_FROM_ALL)
|
||||
if(TARGET rocprofiler-elfio)
|
||||
if(TARGET rocprofiler-sdk-elfio)
|
||||
get_target_property(ELFIO_INCLUDE_DIR elfio::elfio INTERFACE_INCLUDE_DIRECTORIES)
|
||||
target_include_directories(rocprofiler-elfio SYSTEM INTERFACE ${ELFIO_INCLUDE_DIR})
|
||||
target_include_directories(rocprofiler-sdk-elfio SYSTEM
|
||||
INTERFACE ${ELFIO_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
# OTF2
|
||||
|
||||
@@ -65,26 +65,27 @@ set(ROCPROFILER_DEFAULT_FAIL_REGEX
|
||||
CACHE STRING "Default FAIL_REGULAR_EXPRESSION for tests")
|
||||
|
||||
# build flags
|
||||
add_library(rocprofiler-samples-build-flags INTERFACE)
|
||||
add_library(rocprofiler-sdk::samples-build-flags ALIAS rocprofiler-samples-build-flags)
|
||||
target_compile_options(rocprofiler-samples-build-flags INTERFACE -W -Wall -Wextra
|
||||
-Wshadow)
|
||||
target_compile_features(rocprofiler-samples-build-flags INTERFACE cxx_std_17)
|
||||
add_library(rocprofiler-sdk-samples-build-flags INTERFACE)
|
||||
add_library(rocprofiler-sdk::samples-build-flags ALIAS
|
||||
rocprofiler-sdk-samples-build-flags)
|
||||
target_compile_options(rocprofiler-sdk-samples-build-flags INTERFACE -W -Wall -Wextra
|
||||
-Wshadow)
|
||||
target_compile_features(rocprofiler-sdk-samples-build-flags INTERFACE cxx_std_17)
|
||||
|
||||
if(ROCPROFILER_BUILD_CI OR ROCPROFILER_BUILD_WERROR)
|
||||
target_compile_options(rocprofiler-samples-build-flags INTERFACE -Werror)
|
||||
target_compile_options(rocprofiler-sdk-samples-build-flags INTERFACE -Werror)
|
||||
endif()
|
||||
|
||||
# common utilities
|
||||
cmake_path(GET CMAKE_CURRENT_SOURCE_DIR PARENT_PATH COMMON_LIBRARY_INCLUDE_DIR)
|
||||
|
||||
add_library(rocprofiler-samples-common-library INTERFACE)
|
||||
add_library(rocprofiler-sdk-samples-common-library INTERFACE)
|
||||
add_library(rocprofiler-sdk::samples-common-library ALIAS
|
||||
rocprofiler-samples-common-library)
|
||||
target_link_libraries(rocprofiler-samples-common-library
|
||||
rocprofiler-sdk-samples-common-library)
|
||||
target_link_libraries(rocprofiler-sdk-samples-common-library
|
||||
INTERFACE rocprofiler-sdk::samples-build-flags libdw::libdw)
|
||||
target_compile_features(rocprofiler-samples-common-library INTERFACE cxx_std_17)
|
||||
target_include_directories(rocprofiler-samples-common-library
|
||||
target_compile_features(rocprofiler-sdk-samples-common-library INTERFACE cxx_std_17)
|
||||
target_include_directories(rocprofiler-sdk-samples-common-library
|
||||
INTERFACE ${COMMON_LIBRARY_INCLUDE_DIR})
|
||||
|
||||
set(EXTERNAL_SUBMODULE_DIR "${PROJECT_SOURCE_DIR}/../external")
|
||||
@@ -92,10 +93,10 @@ cmake_path(ABSOLUTE_PATH EXTERNAL_SUBMODULE_DIR NORMALIZE)
|
||||
|
||||
if(EXISTS ${EXTERNAL_SUBMODULE_DIR}/filesystem/include/ghc/filesystem.hpp)
|
||||
target_compile_definitions(
|
||||
rocprofiler-samples-common-library
|
||||
rocprofiler-sdk-samples-common-library
|
||||
INTERFACE $<BUILD_INTERFACE:ROCPROFILER_SAMPLES_HAS_GHC_LIB_FILESYSTEM=1>)
|
||||
target_include_directories(
|
||||
rocprofiler-samples-common-library SYSTEM
|
||||
rocprofiler-sdk-samples-common-library SYSTEM
|
||||
INTERFACE $<BUILD_INTERFACE:${EXTERNAL_SUBMODULE_DIR}/filesystem/include>)
|
||||
endif()
|
||||
|
||||
|
||||
@@ -25,7 +25,10 @@ foreach(_TYPE DEBUG MINSIZEREL RELEASE RELWITHDEBINFO)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
find_package(rocprofiler-sdk REQUIRED)
|
||||
#
|
||||
# below is equivalent to: ``find_package(rocprofiler-sdk REQUIRED)``. Use COMPONENTS below
|
||||
# to demonstrate/test support for COMPONENTS
|
||||
find_package(rocprofiler-sdk REQUIRED COMPONENTS headers shared-library)
|
||||
|
||||
add_library(intercept-table-client SHARED)
|
||||
target_sources(intercept-table-client PRIVATE client.cpp client.hpp)
|
||||
|
||||
@@ -23,31 +23,32 @@ set(common_headers
|
||||
units.hpp
|
||||
utility.hpp)
|
||||
|
||||
add_library(rocprofiler-common-library STATIC)
|
||||
add_library(rocprofiler-sdk::rocprofiler-common-library ALIAS rocprofiler-common-library)
|
||||
add_library(rocprofiler-sdk-common-library STATIC)
|
||||
add_library(rocprofiler-sdk::rocprofiler-sdk-common-library ALIAS
|
||||
rocprofiler-sdk-common-library)
|
||||
|
||||
add_subdirectory(container)
|
||||
add_subdirectory(memory)
|
||||
|
||||
target_sources(rocprofiler-common-library PRIVATE ${common_sources} ${common_headers})
|
||||
target_include_directories(rocprofiler-common-library
|
||||
target_sources(rocprofiler-sdk-common-library PRIVATE ${common_sources} ${common_headers})
|
||||
target_include_directories(rocprofiler-sdk-common-library
|
||||
PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/source>)
|
||||
|
||||
target_link_libraries(
|
||||
rocprofiler-common-library
|
||||
PUBLIC $<BUILD_INTERFACE:rocprofiler-sdk::rocprofiler-headers>
|
||||
$<BUILD_INTERFACE:rocprofiler-sdk::rocprofiler-build-flags>
|
||||
$<BUILD_INTERFACE:rocprofiler-sdk::rocprofiler-threading>
|
||||
$<BUILD_INTERFACE:rocprofiler-sdk::rocprofiler-memcheck>
|
||||
$<BUILD_INTERFACE:rocprofiler-sdk::rocprofiler-cxx-filesystem>
|
||||
$<BUILD_INTERFACE:rocprofiler-sdk::rocprofiler-glog>
|
||||
$<BUILD_INTERFACE:rocprofiler-sdk::rocprofiler-fmt>
|
||||
$<BUILD_INTERFACE:rocprofiler-sdk::rocprofiler-yaml-cpp>
|
||||
$<BUILD_INTERFACE:rocprofiler-sdk::rocprofiler-dl>
|
||||
$<BUILD_INTERFACE:rocprofiler-sdk::rocprofiler-ptl>
|
||||
$<BUILD_INTERFACE:rocprofiler-sdk::rocprofiler-atomic>
|
||||
$<BUILD_INTERFACE:rocprofiler-sdk::rocprofiler-hsakmt-nolink>
|
||||
$<BUILD_INTERFACE:rocprofiler-sdk::rocprofiler-elfio>)
|
||||
rocprofiler-sdk-common-library
|
||||
PUBLIC $<BUILD_INTERFACE:rocprofiler-sdk::rocprofiler-sdk-headers>
|
||||
$<BUILD_INTERFACE:rocprofiler-sdk::rocprofiler-sdk-build-flags>
|
||||
$<BUILD_INTERFACE:rocprofiler-sdk::rocprofiler-sdk-threading>
|
||||
$<BUILD_INTERFACE:rocprofiler-sdk::rocprofiler-sdk-memcheck>
|
||||
$<BUILD_INTERFACE:rocprofiler-sdk::rocprofiler-sdk-cxx-filesystem>
|
||||
$<BUILD_INTERFACE:rocprofiler-sdk::rocprofiler-sdk-glog>
|
||||
$<BUILD_INTERFACE:rocprofiler-sdk::rocprofiler-sdk-fmt>
|
||||
$<BUILD_INTERFACE:rocprofiler-sdk::rocprofiler-sdk-yaml-cpp>
|
||||
$<BUILD_INTERFACE:rocprofiler-sdk::rocprofiler-sdk-dl>
|
||||
$<BUILD_INTERFACE:rocprofiler-sdk::rocprofiler-sdk-ptl>
|
||||
$<BUILD_INTERFACE:rocprofiler-sdk::rocprofiler-sdk-atomic>
|
||||
$<BUILD_INTERFACE:rocprofiler-sdk::rocprofiler-sdk-hsakmt-nolink>
|
||||
$<BUILD_INTERFACE:rocprofiler-sdk::rocprofiler-sdk-elfio>)
|
||||
|
||||
set_target_properties(rocprofiler-common-library PROPERTIES OUTPUT_NAME
|
||||
rocprofiler-common)
|
||||
set_target_properties(rocprofiler-sdk-common-library PROPERTIES OUTPUT_NAME
|
||||
rocprofiler-sdk-common)
|
||||
|
||||
@@ -7,5 +7,5 @@ set(containers_headers
|
||||
set(containers_sources ring_buffer.cpp record_header_buffer.cpp ring_buffer.cpp
|
||||
small_vector.cpp)
|
||||
|
||||
target_sources(rocprofiler-common-library PRIVATE ${containers_sources}
|
||||
${containers_headers})
|
||||
target_sources(rocprofiler-sdk-common-library PRIVATE ${containers_sources}
|
||||
${containers_headers})
|
||||
|
||||
@@ -4,4 +4,4 @@
|
||||
set(memory_headers deleter.hpp pool.hpp pool_allocator.hpp stateless_allocator.hpp)
|
||||
set(memory_sources)
|
||||
|
||||
target_sources(rocprofiler-common-library PRIVATE ${memory_sources} ${memory_headers})
|
||||
target_sources(rocprofiler-sdk-common-library PRIVATE ${memory_sources} ${memory_headers})
|
||||
|
||||
@@ -28,8 +28,8 @@ target_include_directories(
|
||||
|
||||
target_link_libraries(
|
||||
rocprofiler-sdk-codeobj
|
||||
INTERFACE rocprofiler-sdk::rocprofiler-amd-comgr rocprofiler-sdk::rocprofiler-dw
|
||||
rocprofiler-sdk::rocprofiler-elf)
|
||||
INTERFACE rocprofiler-sdk::rocprofiler-sdk-amd-comgr
|
||||
rocprofiler-sdk::rocprofiler-sdk-dw rocprofiler-sdk::rocprofiler-sdk-elf)
|
||||
|
||||
if(ROCPROFILER_BUILD_TESTS)
|
||||
add_subdirectory(tests)
|
||||
|
||||
@@ -8,11 +8,11 @@ target_sources(codeobj-library-test PRIVATE ${CODEOBJ_LIB_TEST_SOURCES})
|
||||
|
||||
target_link_libraries(
|
||||
codeobj-library-test
|
||||
PRIVATE rocprofiler-sdk::rocprofiler-static-library
|
||||
rocprofiler-sdk::rocprofiler-glog
|
||||
rocprofiler-sdk::rocprofiler-hsa-runtime
|
||||
rocprofiler-sdk::rocprofiler-hip
|
||||
rocprofiler-sdk::rocprofiler-common-library
|
||||
PRIVATE rocprofiler-sdk::rocprofiler-sdk-static-library
|
||||
rocprofiler-sdk::rocprofiler-sdk-glog
|
||||
rocprofiler-sdk::rocprofiler-sdk-hsa-runtime
|
||||
rocprofiler-sdk::rocprofiler-sdk-hip
|
||||
rocprofiler-sdk::rocprofiler-sdk-common-library
|
||||
GTest::gtest
|
||||
GTest::gtest_main
|
||||
rocprofiler-sdk::rocprofiler-sdk-codeobj)
|
||||
|
||||
@@ -20,10 +20,10 @@ target_include_directories(
|
||||
target_link_libraries(
|
||||
rocprofiler-sdk-roctx-shared-library
|
||||
PRIVATE rocprofiler-register::rocprofiler-register
|
||||
rocprofiler-sdk::rocprofiler-headers
|
||||
rocprofiler-sdk::rocprofiler-build-flags
|
||||
rocprofiler-sdk::rocprofiler-memcheck
|
||||
rocprofiler-sdk::rocprofiler-common-library)
|
||||
rocprofiler-sdk::rocprofiler-sdk-headers
|
||||
rocprofiler-sdk::rocprofiler-sdk-build-flags
|
||||
rocprofiler-sdk::rocprofiler-sdk-memcheck
|
||||
rocprofiler-sdk::rocprofiler-sdk-common-library)
|
||||
|
||||
set_target_properties(
|
||||
rocprofiler-sdk-roctx-shared-library
|
||||
|
||||
@@ -41,14 +41,14 @@ target_sources(rocprofiler-sdk-tool PRIVATE ${TOOL_SOURCES} ${TOOL_HEADERS})
|
||||
|
||||
target_link_libraries(
|
||||
rocprofiler-sdk-tool
|
||||
PRIVATE rocprofiler-sdk::rocprofiler-shared-library
|
||||
rocprofiler-sdk::rocprofiler-headers
|
||||
rocprofiler-sdk::rocprofiler-build-flags
|
||||
rocprofiler-sdk::rocprofiler-memcheck
|
||||
rocprofiler-sdk::rocprofiler-common-library
|
||||
rocprofiler-sdk::rocprofiler-cereal
|
||||
rocprofiler-sdk::rocprofiler-perfetto
|
||||
rocprofiler-sdk::rocprofiler-otf2)
|
||||
PRIVATE rocprofiler-sdk::rocprofiler-sdk-shared-library
|
||||
rocprofiler-sdk::rocprofiler-sdk-headers
|
||||
rocprofiler-sdk::rocprofiler-sdk-build-flags
|
||||
rocprofiler-sdk::rocprofiler-sdk-memcheck
|
||||
rocprofiler-sdk::rocprofiler-sdk-common-library
|
||||
rocprofiler-sdk::rocprofiler-sdk-cereal
|
||||
rocprofiler-sdk::rocprofiler-sdk-perfetto
|
||||
rocprofiler-sdk::rocprofiler-sdk-otf2)
|
||||
|
||||
set_target_properties(
|
||||
rocprofiler-sdk-tool
|
||||
|
||||
@@ -13,8 +13,9 @@ target_sources(rocprofiler-sdk-tool-kokkosp PRIVATE ${KOKKOSP_SOURCES} ${KOKKOSP
|
||||
target_link_libraries(
|
||||
rocprofiler-sdk-tool-kokkosp
|
||||
PRIVATE rocprofiler-sdk-roctx::rocprofiler-sdk-roctx-shared-library
|
||||
rocprofiler-sdk::rocprofiler-headers
|
||||
rocprofiler-sdk::rocprofiler-common-library rocprofiler-sdk::rocprofiler-glog)
|
||||
rocprofiler-sdk::rocprofiler-sdk-headers
|
||||
rocprofiler-sdk::rocprofiler-sdk-common-library
|
||||
rocprofiler-sdk::rocprofiler-sdk-glog)
|
||||
|
||||
set_target_properties(
|
||||
rocprofiler-sdk-tool-kokkosp
|
||||
|
||||
@@ -29,11 +29,12 @@ set(ROCPROFILER_LIB_SOURCES
|
||||
#
|
||||
# ----------------------------------------------------------------------------------------#
|
||||
|
||||
add_library(rocprofiler-object-library OBJECT)
|
||||
add_library(rocprofiler-sdk::rocprofiler-object-library ALIAS rocprofiler-object-library)
|
||||
add_library(rocprofiler-sdk-object-library OBJECT)
|
||||
add_library(rocprofiler-sdk::rocprofiler-sdk-object-library ALIAS
|
||||
rocprofiler-sdk-object-library)
|
||||
|
||||
target_sources(rocprofiler-object-library PRIVATE ${ROCPROFILER_LIB_SOURCES}
|
||||
${ROCPROFILER_LIB_HEADERS})
|
||||
target_sources(rocprofiler-sdk-object-library PRIVATE ${ROCPROFILER_LIB_SOURCES}
|
||||
${ROCPROFILER_LIB_HEADERS})
|
||||
|
||||
add_subdirectory(hsa)
|
||||
add_subdirectory(hip)
|
||||
@@ -51,21 +52,23 @@ add_subdirectory(rccl)
|
||||
add_subdirectory(details)
|
||||
|
||||
target_link_libraries(
|
||||
rocprofiler-object-library
|
||||
PUBLIC rocprofiler-sdk::rocprofiler-headers rocprofiler-sdk::rocprofiler-hip-nolink
|
||||
rocprofiler-sdk::rocprofiler-hsa-runtime-nolink
|
||||
rocprofiler-sdk::rocprofiler-rccl-nolink
|
||||
PRIVATE rocprofiler-sdk::rocprofiler-build-flags
|
||||
rocprofiler-sdk::rocprofiler-memcheck
|
||||
rocprofiler-sdk::rocprofiler-common-library
|
||||
rocprofiler-sdk::rocprofiler-amd-comgr
|
||||
rocprofiler-sdk::rocprofiler-hsa-aql
|
||||
rocprofiler-sdk::rocprofiler-drm
|
||||
rocprofiler-sdk::rocprofiler-hsakmt-nolink)
|
||||
rocprofiler-sdk-object-library
|
||||
PUBLIC rocprofiler-sdk::rocprofiler-sdk-headers
|
||||
rocprofiler-sdk::rocprofiler-sdk-hip-nolink
|
||||
rocprofiler-sdk::rocprofiler-sdk-hsa-runtime-nolink
|
||||
rocprofiler-sdk::rocprofiler-sdk-rccl-nolink
|
||||
PRIVATE rocprofiler-sdk::rocprofiler-sdk-build-flags
|
||||
rocprofiler-sdk::rocprofiler-sdk-memcheck
|
||||
rocprofiler-sdk::rocprofiler-sdk-common-library
|
||||
rocprofiler-sdk::rocprofiler-sdk-amd-comgr
|
||||
rocprofiler-sdk::rocprofiler-sdk-hsa-aql
|
||||
rocprofiler-sdk::rocprofiler-sdk-drm
|
||||
rocprofiler-sdk::rocprofiler-sdk-hsakmt-nolink)
|
||||
|
||||
target_compile_definitions(rocprofiler-object-library PRIVATE rocprofiler_EXPORTS=1)
|
||||
target_compile_definitions(rocprofiler-sdk-object-library PRIVATE rocprofiler_EXPORTS=1)
|
||||
|
||||
set_target_properties(rocprofiler-object-library PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
set_target_properties(rocprofiler-sdk-object-library PROPERTIES POSITION_INDEPENDENT_CODE
|
||||
ON)
|
||||
|
||||
# ----------------------------------------------------------------------------------------#
|
||||
#
|
||||
@@ -73,30 +76,31 @@ set_target_properties(rocprofiler-object-library PROPERTIES POSITION_INDEPENDENT
|
||||
#
|
||||
# ----------------------------------------------------------------------------------------#
|
||||
|
||||
add_library(rocprofiler-shared-library SHARED)
|
||||
add_library(rocprofiler-sdk::rocprofiler-shared-library ALIAS rocprofiler-shared-library)
|
||||
add_library(rocprofiler-sdk-shared-library SHARED)
|
||||
add_library(rocprofiler-sdk::rocprofiler-sdk-shared-library ALIAS
|
||||
rocprofiler-sdk-shared-library)
|
||||
|
||||
target_sources(
|
||||
rocprofiler-shared-library
|
||||
PRIVATE $<TARGET_OBJECTS:rocprofiler-sdk::rocprofiler-object-library>
|
||||
rocprofiler-sdk-shared-library
|
||||
PRIVATE $<TARGET_OBJECTS:rocprofiler-sdk::rocprofiler-sdk-object-library>
|
||||
shared_library.cpp)
|
||||
target_link_libraries(
|
||||
rocprofiler-shared-library
|
||||
INTERFACE rocprofiler-sdk::rocprofiler-headers
|
||||
$<BUILD_INTERFACE:rocprofiler-sdk::rocprofiler-hsa-runtime-nolink>
|
||||
$<BUILD_INTERFACE:rocprofiler-sdk::rocprofiler-hip-nolink>
|
||||
PRIVATE rocprofiler-sdk::rocprofiler-hsa-runtime-nolink
|
||||
rocprofiler-sdk::rocprofiler-hip-nolink
|
||||
rocprofiler-sdk::rocprofiler-build-flags
|
||||
rocprofiler-sdk::rocprofiler-memcheck
|
||||
rocprofiler-sdk::rocprofiler-common-library
|
||||
rocprofiler-sdk::rocprofiler-cxx-filesystem
|
||||
rocprofiler-sdk::rocprofiler-dl
|
||||
rocprofiler-sdk::rocprofiler-amd-comgr
|
||||
rocprofiler-sdk::rocprofiler-object-library)
|
||||
rocprofiler-sdk-shared-library
|
||||
INTERFACE rocprofiler-sdk::rocprofiler-sdk-headers
|
||||
$<BUILD_INTERFACE:rocprofiler-sdk::rocprofiler-sdk-hsa-runtime-nolink>
|
||||
$<BUILD_INTERFACE:rocprofiler-sdk::rocprofiler-sdk-hip-nolink>
|
||||
PRIVATE rocprofiler-sdk::rocprofiler-sdk-hsa-runtime-nolink
|
||||
rocprofiler-sdk::rocprofiler-sdk-hip-nolink
|
||||
rocprofiler-sdk::rocprofiler-sdk-build-flags
|
||||
rocprofiler-sdk::rocprofiler-sdk-memcheck
|
||||
rocprofiler-sdk::rocprofiler-sdk-common-library
|
||||
rocprofiler-sdk::rocprofiler-sdk-cxx-filesystem
|
||||
rocprofiler-sdk::rocprofiler-sdk-dl
|
||||
rocprofiler-sdk::rocprofiler-sdk-amd-comgr
|
||||
rocprofiler-sdk::rocprofiler-sdk-object-library)
|
||||
|
||||
set_target_properties(
|
||||
rocprofiler-shared-library
|
||||
rocprofiler-sdk-shared-library
|
||||
PROPERTIES OUTPUT_NAME rocprofiler-sdk
|
||||
SOVERSION ${PROJECT_VERSION_MAJOR}
|
||||
VERSION ${PROJECT_VERSION}
|
||||
@@ -104,10 +108,10 @@ set_target_properties(
|
||||
INSTALL_RPATH "\$ORIGIN"
|
||||
DEFINE_SYMBOL rocprofiler_EXPORTS)
|
||||
|
||||
add_library(rocprofiler-sdk::rocprofiler-library ALIAS rocprofiler-shared-library)
|
||||
add_library(rocprofiler-sdk::rocprofiler-library ALIAS rocprofiler-sdk-shared-library)
|
||||
|
||||
install(
|
||||
TARGETS rocprofiler-shared-library
|
||||
TARGETS rocprofiler-sdk-shared-library
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
COMPONENT core
|
||||
EXPORT rocprofiler-sdk-targets)
|
||||
@@ -118,22 +122,23 @@ install(
|
||||
#
|
||||
# ----------------------------------------------------------------------------------------#
|
||||
|
||||
add_library(rocprofiler-static-library EXCLUDE_FROM_ALL STATIC)
|
||||
add_library(rocprofiler-sdk::rocprofiler-static-library ALIAS rocprofiler-static-library)
|
||||
add_library(rocprofiler-sdk-static-library EXCLUDE_FROM_ALL STATIC)
|
||||
add_library(rocprofiler-sdk::rocprofiler-sdk-static-library ALIAS
|
||||
rocprofiler-sdk-static-library)
|
||||
|
||||
target_sources(rocprofiler-static-library
|
||||
PRIVATE $<TARGET_OBJECTS:rocprofiler-sdk::rocprofiler-object-library>)
|
||||
target_sources(rocprofiler-sdk-static-library
|
||||
PRIVATE $<TARGET_OBJECTS:rocprofiler-sdk::rocprofiler-sdk-object-library>)
|
||||
target_link_libraries(
|
||||
rocprofiler-static-library
|
||||
PUBLIC rocprofiler-sdk::rocprofiler-headers
|
||||
rocprofiler-sdk::rocprofiler-hsa-runtime-nolink
|
||||
rocprofiler-sdk::rocprofiler-hip-nolink
|
||||
PRIVATE rocprofiler-sdk::rocprofiler-common-library
|
||||
rocprofiler-sdk::rocprofiler-object-library)
|
||||
rocprofiler-sdk-static-library
|
||||
PUBLIC rocprofiler-sdk::rocprofiler-sdk-headers
|
||||
rocprofiler-sdk::rocprofiler-sdk-hsa-runtime-nolink
|
||||
rocprofiler-sdk::rocprofiler-sdk-hip-nolink
|
||||
PRIVATE rocprofiler-sdk::rocprofiler-sdk-common-library
|
||||
rocprofiler-sdk::rocprofiler-sdk-object-library)
|
||||
|
||||
set_target_properties(
|
||||
rocprofiler-static-library PROPERTIES OUTPUT_NAME rocprofiler-sdk DEFINE_SYMBOL
|
||||
rocprofiler_EXPORTS)
|
||||
rocprofiler-sdk-static-library PROPERTIES OUTPUT_NAME rocprofiler-sdk
|
||||
DEFINE_SYMBOL rocprofiler_EXPORTS)
|
||||
|
||||
# ----------------------------------------------------------------------------------------#
|
||||
#
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
set(ROCPROFILER_LIB_AQL_SOURCES helpers.cpp packet_construct.cpp)
|
||||
set(ROCPROFILER_LIB_AQL_HEADERS helpers.hpp packet_construct.hpp aql_profile_v2.h)
|
||||
|
||||
target_sources(rocprofiler-object-library PRIVATE ${ROCPROFILER_LIB_AQL_SOURCES}
|
||||
${ROCPROFILER_LIB_AQL_HEADERS})
|
||||
target_sources(rocprofiler-sdk-object-library PRIVATE ${ROCPROFILER_LIB_AQL_SOURCES}
|
||||
${ROCPROFILER_LIB_AQL_HEADERS})
|
||||
|
||||
if(ROCPROFILER_BUILD_TESTS)
|
||||
add_subdirectory(tests)
|
||||
|
||||
@@ -11,11 +11,11 @@ target_sources(aql-test PRIVATE ${ROCPROFILER_LIB_AQL_TEST_SOURCES})
|
||||
target_link_libraries(
|
||||
aql-test
|
||||
PRIVATE rocprofiler-sdk::counter-test-constants
|
||||
rocprofiler-sdk::rocprofiler-static-library
|
||||
rocprofiler-sdk::rocprofiler-glog
|
||||
rocprofiler-sdk::rocprofiler-hsa-runtime
|
||||
rocprofiler-sdk::rocprofiler-hip
|
||||
rocprofiler-sdk::rocprofiler-common-library
|
||||
rocprofiler-sdk::rocprofiler-sdk-static-library
|
||||
rocprofiler-sdk::rocprofiler-sdk-glog
|
||||
rocprofiler-sdk::rocprofiler-sdk-hsa-runtime
|
||||
rocprofiler-sdk::rocprofiler-sdk-hip
|
||||
rocprofiler-sdk::rocprofiler-sdk-common-library
|
||||
GTest::gtest
|
||||
GTest::gtest_main)
|
||||
|
||||
|
||||
@@ -4,8 +4,9 @@
|
||||
set(ROCPROFILER_LIB_CODE_OBJECT_SOURCES code_object.cpp)
|
||||
set(ROCPROFILER_LIB_CODE_OBJECT_HEADERS code_object.hpp)
|
||||
|
||||
target_sources(rocprofiler-object-library PRIVATE ${ROCPROFILER_LIB_CODE_OBJECT_SOURCES}
|
||||
${ROCPROFILER_LIB_CODE_OBJECT_HEADERS})
|
||||
target_sources(
|
||||
rocprofiler-sdk-object-library PRIVATE ${ROCPROFILER_LIB_CODE_OBJECT_SOURCES}
|
||||
${ROCPROFILER_LIB_CODE_OBJECT_HEADERS})
|
||||
|
||||
add_subdirectory(hsa)
|
||||
add_subdirectory(hip)
|
||||
|
||||
@@ -5,5 +5,5 @@ set(ROCPROFILER_LIB_CODE_OBJECT_HIP_SOURCES)
|
||||
set(ROCPROFILER_LIB_CODE_OBJECT_HIP_HEADERS)
|
||||
|
||||
target_sources(
|
||||
rocprofiler-object-library PRIVATE ${ROCPROFILER_LIB_CODE_OBJECT_HIP_SOURCES}
|
||||
${ROCPROFILER_LIB_CODE_OBJECT_HIP_HEADERS})
|
||||
rocprofiler-sdk-object-library PRIVATE ${ROCPROFILER_LIB_CODE_OBJECT_HIP_SOURCES}
|
||||
${ROCPROFILER_LIB_CODE_OBJECT_HIP_HEADERS})
|
||||
|
||||
@@ -5,5 +5,5 @@ set(ROCPROFILER_LIB_CODE_OBJECT_HSA_SOURCES code_object.cpp kernel_symbol.cpp)
|
||||
set(ROCPROFILER_LIB_CODE_OBJECT_HSA_HEADERS code_object.hpp kernel_symbol.hpp)
|
||||
|
||||
target_sources(
|
||||
rocprofiler-object-library PRIVATE ${ROCPROFILER_LIB_CODE_OBJECT_HSA_SOURCES}
|
||||
${ROCPROFILER_LIB_CODE_OBJECT_HSA_HEADERS})
|
||||
rocprofiler-sdk-object-library PRIVATE ${ROCPROFILER_LIB_CODE_OBJECT_HSA_SOURCES}
|
||||
${ROCPROFILER_LIB_CODE_OBJECT_HSA_HEADERS})
|
||||
|
||||
@@ -4,5 +4,5 @@
|
||||
set(ROCPROFILER_LIB_CONFIG_SOURCES context.cpp correlation_id.cpp domain.cpp)
|
||||
set(ROCPROFILER_LIB_CONFIG_HEADERS context.hpp correlation_id.hpp domain.hpp)
|
||||
|
||||
target_sources(rocprofiler-object-library PRIVATE ${ROCPROFILER_LIB_CONFIG_SOURCES}
|
||||
${ROCPROFILER_LIB_CONFIG_HEADERS})
|
||||
target_sources(rocprofiler-sdk-object-library PRIVATE ${ROCPROFILER_LIB_CONFIG_SOURCES}
|
||||
${ROCPROFILER_LIB_CONFIG_HEADERS})
|
||||
|
||||
@@ -4,8 +4,8 @@ set(ROCPROFILER_LIB_COUNTERS_SOURCES
|
||||
set(ROCPROFILER_LIB_COUNTERS_HEADERS
|
||||
metrics.hpp dimensions.hpp evaluate_ast.hpp core.hpp id_decode.hpp
|
||||
dispatch_handlers.hpp controller.hpp device_counting.hpp)
|
||||
target_sources(rocprofiler-object-library PRIVATE ${ROCPROFILER_LIB_COUNTERS_SOURCES}
|
||||
${ROCPROFILER_LIB_COUNTERS_HEADERS})
|
||||
target_sources(rocprofiler-sdk-object-library PRIVATE ${ROCPROFILER_LIB_COUNTERS_SOURCES}
|
||||
${ROCPROFILER_LIB_COUNTERS_HEADERS})
|
||||
|
||||
add_subdirectory(xml)
|
||||
add_subdirectory(parser)
|
||||
|
||||
@@ -2,7 +2,7 @@ rocprofiler_deactivate_clang_tidy()
|
||||
|
||||
set(expr_parser_sources parser.cpp parser.h scanner.cpp raw_ast.hpp reader.hpp)
|
||||
|
||||
add_library(rocprofiler-expr-parser OBJECT)
|
||||
add_library(rocprofiler-sdk-expr-parser OBJECT)
|
||||
|
||||
if(ROCPROFILER_REGENERATE_COUNTERS_PARSER)
|
||||
find_package(FLEX REQUIRED)
|
||||
@@ -22,7 +22,7 @@ if(ROCPROFILER_REGENERATE_COUNTERS_PARSER)
|
||||
YYDEBUG=1)
|
||||
|
||||
add_custom_target(
|
||||
rocprofiler-expr-parser-patch
|
||||
rocprofiler-sdk-expr-parser-patch
|
||||
COMMAND
|
||||
${CMAKE_COMMAND} -DPROJECT_SRC_DIR=${PROJECT_SOURCE_DIR}
|
||||
-DPROJECT_BLD_DIR=${PROJECT_BINARY_DIR}
|
||||
@@ -34,17 +34,18 @@ if(ROCPROFILER_REGENERATE_COUNTERS_PARSER)
|
||||
${CMAKE_CURRENT_BINARY_DIR}/scanner.cpp
|
||||
VERBATIM)
|
||||
|
||||
# ensure gets applied when rocprofiler-expr-parser is built
|
||||
add_dependencies(rocprofiler-expr-parser rocprofiler-expr-parser-patch)
|
||||
# ensure gets applied when rocprofiler-sdk-expr-parser is built
|
||||
add_dependencies(rocprofiler-sdk-expr-parser rocprofiler-sdk-expr-parser-patch)
|
||||
endif()
|
||||
|
||||
target_sources(rocprofiler-expr-parser PRIVATE ${expr_parser_sources})
|
||||
target_include_directories(rocprofiler-expr-parser PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
target_compile_definitions(rocprofiler-expr-parser PRIVATE YY_NO_INPUT)
|
||||
target_link_libraries(rocprofiler-expr-parser
|
||||
PRIVATE rocprofiler-sdk::rocprofiler-common-library)
|
||||
target_sources(rocprofiler-object-library
|
||||
PUBLIC $<TARGET_OBJECTS:rocprofiler-expr-parser>)
|
||||
target_sources(rocprofiler-sdk-expr-parser PRIVATE ${expr_parser_sources})
|
||||
target_include_directories(rocprofiler-sdk-expr-parser
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
target_compile_definitions(rocprofiler-sdk-expr-parser PRIVATE YY_NO_INPUT)
|
||||
target_link_libraries(rocprofiler-sdk-expr-parser
|
||||
PRIVATE rocprofiler-sdk::rocprofiler-sdk-common-library)
|
||||
target_sources(rocprofiler-sdk-object-library
|
||||
PUBLIC $<TARGET_OBJECTS:rocprofiler-sdk-expr-parser>)
|
||||
|
||||
if(ROCPROFILER_BUILD_TESTS)
|
||||
add_subdirectory(tests)
|
||||
|
||||
@@ -10,8 +10,9 @@ target_sources(parser-test PRIVATE ${ROCPROFILER_LIB_PARSER_TEST_SOURCES})
|
||||
|
||||
target_link_libraries(
|
||||
parser-test
|
||||
PRIVATE rocprofiler-sdk::rocprofiler-common-library
|
||||
rocprofiler-sdk::rocprofiler-static-library GTest::gtest GTest::gtest_main)
|
||||
PRIVATE rocprofiler-sdk::rocprofiler-sdk-common-library
|
||||
rocprofiler-sdk::rocprofiler-sdk-static-library GTest::gtest
|
||||
GTest::gtest_main)
|
||||
|
||||
gtest_add_tests(
|
||||
TARGET parser-test
|
||||
|
||||
@@ -50,9 +50,10 @@ target_sources(
|
||||
|
||||
target_link_libraries(
|
||||
counter_test_constants
|
||||
PRIVATE rocprofiler-sdk::rocprofiler-common-library
|
||||
rocprofiler-sdk::rocprofiler-static-library rocprofiler-sdk::rocprofiler-hip
|
||||
rocprofiler-sdk::rocprofiler-hsa-runtime)
|
||||
PRIVATE rocprofiler-sdk::rocprofiler-sdk-common-library
|
||||
rocprofiler-sdk::rocprofiler-sdk-static-library
|
||||
rocprofiler-sdk::rocprofiler-sdk-hip
|
||||
rocprofiler-sdk::rocprofiler-sdk-hsa-runtime)
|
||||
|
||||
set(ROCPROFILER_LIB_COUNTER_TEST_SOURCES
|
||||
metrics_test.cpp evaluate_ast_test.cpp dimension.cpp init_order.cpp core.cpp
|
||||
@@ -69,10 +70,10 @@ add_dependencies(counter-test agent_hasco_targets)
|
||||
target_link_libraries(
|
||||
counter-test
|
||||
PRIVATE rocprofiler-sdk::counter-test-constants
|
||||
rocprofiler-sdk::rocprofiler-hsa-runtime
|
||||
rocprofiler-sdk::rocprofiler-hip
|
||||
rocprofiler-sdk::rocprofiler-common-library
|
||||
rocprofiler-sdk::rocprofiler-static-library
|
||||
rocprofiler-sdk::rocprofiler-sdk-hsa-runtime
|
||||
rocprofiler-sdk::rocprofiler-sdk-hip
|
||||
rocprofiler-sdk::rocprofiler-sdk-common-library
|
||||
rocprofiler-sdk::rocprofiler-sdk-static-library
|
||||
GTest::gtest
|
||||
GTest::gtest_main)
|
||||
|
||||
|
||||
@@ -4,5 +4,5 @@
|
||||
set(ROCPROFILER_DETAILS_SOURCES)
|
||||
set(ROCPROFILER_DETAILS_HEADERS kfd_ioctl.h)
|
||||
|
||||
target_sources(rocprofiler-object-library PRIVATE ${ROCPROFILER_DETAILS_SOURCES}
|
||||
${ROCPROFILER_DETAILS_HEADERS})
|
||||
target_sources(rocprofiler-sdk-object-library PRIVATE ${ROCPROFILER_DETAILS_SOURCES}
|
||||
${ROCPROFILER_DETAILS_HEADERS})
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
set(ROCPROFILER_LIB_HIP_SOURCES abi.cpp hip.cpp)
|
||||
set(ROCPROFILER_LIB_HIP_HEADERS defines.hpp hip.hpp utils.hpp)
|
||||
|
||||
target_sources(rocprofiler-object-library PRIVATE ${ROCPROFILER_LIB_HIP_SOURCES}
|
||||
${ROCPROFILER_LIB_HIP_HEADERS})
|
||||
target_sources(rocprofiler-sdk-object-library PRIVATE ${ROCPROFILER_LIB_HIP_SOURCES}
|
||||
${ROCPROFILER_LIB_HIP_HEADERS})
|
||||
|
||||
add_subdirectory(details)
|
||||
|
||||
@@ -4,5 +4,6 @@
|
||||
set(ROCPROFILER_LIB_HIP_DETAILS_SOURCES)
|
||||
set(ROCPROFILER_LIB_HIP_DETAILS_HEADERS format.hpp ostream.hpp)
|
||||
|
||||
target_sources(rocprofiler-object-library PRIVATE ${ROCPROFILER_LIB_HIP_DETAILS_SOURCES}
|
||||
${ROCPROFILER_LIB_HIP_DETAILS_HEADERS})
|
||||
target_sources(
|
||||
rocprofiler-sdk-object-library PRIVATE ${ROCPROFILER_LIB_HIP_DETAILS_SOURCES}
|
||||
${ROCPROFILER_LIB_HIP_DETAILS_HEADERS})
|
||||
|
||||
@@ -28,7 +28,7 @@ set(ROCPROFILER_LIB_HSA_HEADERS
|
||||
scratch_memory.hpp
|
||||
utils.hpp)
|
||||
|
||||
target_sources(rocprofiler-object-library PRIVATE ${ROCPROFILER_LIB_HSA_SOURCES}
|
||||
${ROCPROFILER_LIB_HSA_HEADERS})
|
||||
target_sources(rocprofiler-sdk-object-library PRIVATE ${ROCPROFILER_LIB_HSA_SOURCES}
|
||||
${ROCPROFILER_LIB_HSA_HEADERS})
|
||||
|
||||
add_subdirectory(details)
|
||||
|
||||
@@ -4,5 +4,6 @@
|
||||
set(ROCPROFILER_LIB_HSA_DETAILS_SOURCES)
|
||||
set(ROCPROFILER_LIB_HSA_DETAILS_HEADERS ostream.hpp fmt.hpp)
|
||||
|
||||
target_sources(rocprofiler-object-library PRIVATE ${ROCPROFILER_LIB_HSA_DETAILS_SOURCES}
|
||||
${ROCPROFILER_LIB_HSA_DETAILS_HEADERS})
|
||||
target_sources(
|
||||
rocprofiler-sdk-object-library PRIVATE ${ROCPROFILER_LIB_HSA_DETAILS_SOURCES}
|
||||
${ROCPROFILER_LIB_HSA_DETAILS_HEADERS})
|
||||
|
||||
@@ -5,5 +5,5 @@ set(ROCPROFILER_LIB_KERNEL_DISPATCH_HEADERS kernel_dispatch.hpp profiling_time.h
|
||||
tracing.hpp)
|
||||
|
||||
target_sources(
|
||||
rocprofiler-object-library PRIVATE ${ROCPROFILER_LIB_KERNEL_DISPATCH_SOURCES}
|
||||
${ROCPROFILER_LIB_KERNEL_DISPATCH_HEADERS})
|
||||
rocprofiler-sdk-object-library PRIVATE ${ROCPROFILER_LIB_KERNEL_DISPATCH_SOURCES}
|
||||
${ROCPROFILER_LIB_KERNEL_DISPATCH_HEADERS})
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
set(ROCPROFILER_LIB_MARKER_SOURCES marker.cpp)
|
||||
set(ROCPROFILER_LIB_MARKER_HEADERS defines.hpp marker.hpp utils.hpp)
|
||||
|
||||
target_sources(rocprofiler-object-library PRIVATE ${ROCPROFILER_LIB_MARKER_SOURCES}
|
||||
${ROCPROFILER_LIB_MARKER_HEADERS})
|
||||
target_sources(rocprofiler-sdk-object-library PRIVATE ${ROCPROFILER_LIB_MARKER_SOURCES}
|
||||
${ROCPROFILER_LIB_MARKER_HEADERS})
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
set(ROCPROFILER_LIB_UVM_SOURCES page_migration.cpp)
|
||||
set(ROCPROFILER_LIB_UVM_HEADERS defines.hpp page_migration.hpp utils.hpp)
|
||||
|
||||
target_sources(rocprofiler-object-library PRIVATE ${ROCPROFILER_LIB_UVM_SOURCES}
|
||||
${ROCPROFILER_LIB_UVM_HEADERS})
|
||||
target_sources(rocprofiler-sdk-object-library PRIVATE ${ROCPROFILER_LIB_UVM_SOURCES}
|
||||
${ROCPROFILER_LIB_UVM_HEADERS})
|
||||
|
||||
@@ -13,8 +13,8 @@ set(ROCPROFILER_PC_SAMPLING_SOURCES hsa_adapter.cpp utils.cpp service.cpp cid_ma
|
||||
set(ROCPROFILER_PC_SAMPLING_HEADERS hsa_adapter.hpp utils.hpp service.hpp types.hpp
|
||||
cid_manager.hpp code_object.hpp)
|
||||
|
||||
target_sources(rocprofiler-object-library PRIVATE ${ROCPROFILER_PC_SAMPLING_SOURCES}
|
||||
${ROCPROFILER_PC_SAMPLING_HEADERS})
|
||||
target_sources(rocprofiler-sdk-object-library PRIVATE ${ROCPROFILER_PC_SAMPLING_SOURCES}
|
||||
${ROCPROFILER_PC_SAMPLING_HEADERS})
|
||||
|
||||
add_subdirectory(ioctl)
|
||||
|
||||
|
||||
@@ -2,5 +2,5 @@ set(ROCPROFILER_PC_SAMPLING_IOCTL_SOURCES ioctl_adapter.cpp)
|
||||
set(ROCPROFILER_PC_SAMPLING_IOCTL_HEADERS ioctl_adapter.hpp ioctl_adapter_types.hpp)
|
||||
|
||||
target_sources(
|
||||
rocprofiler-object-library PRIVATE ${ROCPROFILER_PC_SAMPLING_IOCTL_SOURCES}
|
||||
${ROCPROFILER_PC_SAMPLING_IOCTL_HEADERS})
|
||||
rocprofiler-sdk-object-library PRIVATE ${ROCPROFILER_PC_SAMPLING_IOCTL_SOURCES}
|
||||
${ROCPROFILER_PC_SAMPLING_IOCTL_HEADERS})
|
||||
|
||||
@@ -4,8 +4,8 @@ set(ROCPROFILER_LIB_PC_SAMPLING_PARSER_HEADERS
|
||||
translation.hpp)
|
||||
|
||||
target_sources(
|
||||
rocprofiler-object-library PRIVATE ${ROCPROFILER_LIB_PC_SAMPLING_PARSER_SOURCES}
|
||||
${ROCPROFILER_LIB_PC_SAMPLING_PARSER_HEADERS})
|
||||
rocprofiler-sdk-object-library PRIVATE ${ROCPROFILER_LIB_PC_SAMPLING_PARSER_SOURCES}
|
||||
${ROCPROFILER_LIB_PC_SAMPLING_PARSER_HEADERS})
|
||||
|
||||
if(ROCPROFILER_BUILD_TESTS)
|
||||
add_subdirectory(tests)
|
||||
|
||||
@@ -18,8 +18,9 @@ target_include_directories(pcs_gfx9_test PRIVATE ${PCTEST_INCLUDE_DIR})
|
||||
|
||||
target_link_libraries(
|
||||
pcs_gfx9_test
|
||||
PRIVATE rocprofiler-sdk::rocprofiler-common-library
|
||||
rocprofiler-sdk::rocprofiler-static-library GTest::gtest GTest::gtest_main)
|
||||
PRIVATE rocprofiler-sdk::rocprofiler-sdk-common-library
|
||||
rocprofiler-sdk::rocprofiler-sdk-static-library GTest::gtest
|
||||
GTest::gtest_main)
|
||||
|
||||
gtest_add_tests(
|
||||
TARGET pcs_gfx9_test
|
||||
@@ -36,8 +37,9 @@ target_include_directories(pcs_id_test PRIVATE ${PCTEST_INCLUDE_DIR})
|
||||
|
||||
target_link_libraries(
|
||||
pcs_id_test
|
||||
PRIVATE rocprofiler-sdk::rocprofiler-common-library
|
||||
rocprofiler-sdk::rocprofiler-static-library GTest::gtest GTest::gtest_main)
|
||||
PRIVATE rocprofiler-sdk::rocprofiler-sdk-common-library
|
||||
rocprofiler-sdk::rocprofiler-sdk-static-library GTest::gtest
|
||||
GTest::gtest_main)
|
||||
|
||||
gtest_add_tests(
|
||||
TARGET pcs_id_test
|
||||
@@ -56,8 +58,9 @@ target_include_directories(pcs_bench_test PRIVATE ${PCTEST_INCLUDE_DIR})
|
||||
|
||||
target_link_libraries(
|
||||
pcs_bench_test
|
||||
PRIVATE rocprofiler-sdk::rocprofiler-common-library
|
||||
rocprofiler-sdk::rocprofiler-static-library GTest::gtest GTest::gtest_main)
|
||||
PRIVATE rocprofiler-sdk::rocprofiler-sdk-common-library
|
||||
rocprofiler-sdk::rocprofiler-sdk-static-library GTest::gtest
|
||||
GTest::gtest_main)
|
||||
|
||||
add_executable(pcs_thread_test)
|
||||
target_compile_options(pcs_thread_test PRIVATE "-Ofast")
|
||||
@@ -67,8 +70,9 @@ target_include_directories(pcs_thread_test PRIVATE ${PCTEST_INCLUDE_DIR})
|
||||
|
||||
target_link_libraries(
|
||||
pcs_thread_test
|
||||
PRIVATE rocprofiler-sdk::rocprofiler-common-library
|
||||
rocprofiler-sdk::rocprofiler-static-library GTest::gtest GTest::gtest_main)
|
||||
PRIVATE rocprofiler-sdk::rocprofiler-sdk-common-library
|
||||
rocprofiler-sdk::rocprofiler-sdk-static-library GTest::gtest
|
||||
GTest::gtest_main)
|
||||
|
||||
gtest_add_tests(
|
||||
TARGET pcs_thread_test
|
||||
|
||||
@@ -15,8 +15,9 @@ target_sources(pcs-test PRIVATE ${ROCPROFILER_LIB_PC_SAMPLING_TEST_SOURCES}
|
||||
|
||||
target_link_libraries(
|
||||
pcs-test
|
||||
PRIVATE rocprofiler-sdk::rocprofiler-common-library
|
||||
rocprofiler-sdk::rocprofiler-static-library GTest::gtest GTest::gtest_main)
|
||||
PRIVATE rocprofiler-sdk::rocprofiler-sdk-common-library
|
||||
rocprofiler-sdk::rocprofiler-sdk-static-library GTest::gtest
|
||||
GTest::gtest_main)
|
||||
|
||||
gtest_add_tests(
|
||||
TARGET pcs-test
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
set(ROCPROFILER_LIB_RCCL_SOURCES abi.cpp rccl.cpp)
|
||||
set(ROCPROFILER_LIB_RCCL_HEADERS defines.hpp rccl.hpp)
|
||||
|
||||
target_sources(rocprofiler-object-library PRIVATE ${ROCPROFILER_LIB_RCCL_SOURCES}
|
||||
${ROCPROFILER_LIB_RCCL_HEADERS})
|
||||
target_sources(rocprofiler-sdk-object-library PRIVATE ${ROCPROFILER_LIB_RCCL_SOURCES}
|
||||
${ROCPROFILER_LIB_RCCL_HEADERS})
|
||||
|
||||
@@ -14,19 +14,20 @@ include(GoogleTest)
|
||||
set(rocprofiler_lib_sources agent.cpp buffer.cpp contexts.cpp hsa.cpp naming.cpp
|
||||
timestamp.cpp version.cpp hsa_barrier.cpp)
|
||||
|
||||
add_executable(rocprofiler-lib-tests)
|
||||
target_sources(rocprofiler-lib-tests PRIVATE ${rocprofiler_lib_sources} details/agent.cpp)
|
||||
add_executable(rocprofiler-sdk-lib-tests)
|
||||
target_sources(rocprofiler-sdk-lib-tests PRIVATE ${rocprofiler_lib_sources}
|
||||
details/agent.cpp)
|
||||
target_link_libraries(
|
||||
rocprofiler-lib-tests
|
||||
PRIVATE rocprofiler-sdk::rocprofiler-static-library
|
||||
rocprofiler-sdk::rocprofiler-common-library
|
||||
rocprofiler-sdk-lib-tests
|
||||
PRIVATE rocprofiler-sdk::rocprofiler-sdk-static-library
|
||||
rocprofiler-sdk::rocprofiler-sdk-common-library
|
||||
rocprofiler-sdk::counter-test-constants
|
||||
rocprofiler-sdk::rocprofiler-hsa-runtime
|
||||
rocprofiler-sdk::rocprofiler-sdk-hsa-runtime
|
||||
GTest::gtest
|
||||
GTest::gtest_main)
|
||||
|
||||
gtest_add_tests(
|
||||
TARGET rocprofiler-lib-tests
|
||||
TARGET rocprofiler-sdk-lib-tests
|
||||
SOURCES ${rocprofiler_lib_sources}
|
||||
TEST_LIST lib_TESTS
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
@@ -43,29 +44,29 @@ set(rocprofiler_shared_lib_sources
|
||||
external_correlation.cpp intercept_table.cpp page_migration.cpp registration.cpp
|
||||
roctx.cpp status.cpp)
|
||||
|
||||
add_executable(rocprofiler-lib-tests-shared)
|
||||
target_sources(rocprofiler-lib-tests-shared PRIVATE ${rocprofiler_shared_lib_sources})
|
||||
add_executable(rocprofiler-sdk-lib-tests-shared)
|
||||
target_sources(rocprofiler-sdk-lib-tests-shared PRIVATE ${rocprofiler_shared_lib_sources})
|
||||
target_link_libraries(
|
||||
rocprofiler-lib-tests-shared
|
||||
PRIVATE rocprofiler-sdk::rocprofiler-shared-library
|
||||
rocprofiler-sdk::rocprofiler-common-library
|
||||
rocprofiler-sdk::rocprofiler-hsa-runtime
|
||||
rocprofiler-sdk::rocprofiler-drm
|
||||
rocprofiler-sdk-lib-tests-shared
|
||||
PRIVATE rocprofiler-sdk::rocprofiler-sdk-shared-library
|
||||
rocprofiler-sdk::rocprofiler-sdk-common-library
|
||||
rocprofiler-sdk::rocprofiler-sdk-hsa-runtime
|
||||
rocprofiler-sdk::rocprofiler-sdk-drm
|
||||
rocprofiler-sdk::rocprofiler-sdk-roctx-shared-library
|
||||
GTest::gtest
|
||||
GTest::gtest_main)
|
||||
set_target_properties(rocprofiler-lib-tests-shared PROPERTIES BUILD_RPATH
|
||||
"\$ORIGIN/../lib")
|
||||
set_target_properties(rocprofiler-sdk-lib-tests-shared PROPERTIES BUILD_RPATH
|
||||
"\$ORIGIN/../lib")
|
||||
|
||||
gtest_add_tests(
|
||||
TARGET rocprofiler-lib-tests-shared
|
||||
TARGET rocprofiler-sdk-lib-tests-shared
|
||||
SOURCES ${rocprofiler_shared_lib_sources}
|
||||
TEST_LIST shared_lib_TESTS
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
set(rocprofiler-lib-tests-env
|
||||
set(rocprofiler-sdk-lib-tests-env
|
||||
"LD_LIBRARY_PATH=${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}:$ENV{LD_LIBRARY_PATH}")
|
||||
|
||||
set_tests_properties(
|
||||
${shared_lib_TESTS} PROPERTIES TIMEOUT 120 LABELS "unittests" ENVIRONMENT
|
||||
"${rocprofiler-lib-tests-env}")
|
||||
"${rocprofiler-sdk-lib-tests-env}")
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
set(ROCPROFILER_LIB_THREAD_TRACE_SOURCES att_core.cpp att_service.cpp att_parser.cpp
|
||||
code_object.cpp)
|
||||
set(ROCPROFILER_LIB_THREAD_TRACE_HEADERS att_core.hpp code_object.hpp)
|
||||
target_sources(rocprofiler-object-library PRIVATE ${ROCPROFILER_LIB_THREAD_TRACE_SOURCES}
|
||||
${ROCPROFILER_LIB_THREAD_TRACE_HEADERS})
|
||||
target_sources(
|
||||
rocprofiler-sdk-object-library PRIVATE ${ROCPROFILER_LIB_THREAD_TRACE_SOURCES}
|
||||
${ROCPROFILER_LIB_THREAD_TRACE_HEADERS})
|
||||
|
||||
if(ROCPROFILER_BUILD_TESTS)
|
||||
add_subdirectory(tests)
|
||||
|
||||
@@ -10,11 +10,11 @@ target_sources(thread-trace-packet-test PRIVATE ${ROCPROFILER_THREAD_TRACE_TEST_
|
||||
|
||||
target_link_libraries(
|
||||
thread-trace-packet-test
|
||||
PRIVATE rocprofiler-sdk::rocprofiler-static-library
|
||||
rocprofiler-sdk::rocprofiler-glog
|
||||
rocprofiler-sdk::rocprofiler-hsa-runtime
|
||||
rocprofiler-sdk::rocprofiler-hip
|
||||
rocprofiler-sdk::rocprofiler-common-library
|
||||
PRIVATE rocprofiler-sdk::rocprofiler-sdk-static-library
|
||||
rocprofiler-sdk::rocprofiler-sdk-glog
|
||||
rocprofiler-sdk::rocprofiler-sdk-hsa-runtime
|
||||
rocprofiler-sdk::rocprofiler-sdk-hip
|
||||
rocprofiler-sdk::rocprofiler-sdk-common-library
|
||||
GTest::gtest
|
||||
GTest::gtest_main
|
||||
rocprofiler-sdk::counter-test-constants)
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
set(ROCPROFILER_LIB_TRACING_SOURCES)
|
||||
set(ROCPROFILER_LIB_TRACING_HEADERS fwd.hpp tracing.hpp)
|
||||
|
||||
target_sources(rocprofiler-object-library PRIVATE ${ROCPROFILER_LIB_TRACING_SOURCES}
|
||||
${ROCPROFILER_LIB_TRACING_HEADERS})
|
||||
target_sources(rocprofiler-sdk-object-library PRIVATE ${ROCPROFILER_LIB_TRACING_SOURCES}
|
||||
${ROCPROFILER_LIB_TRACING_HEADERS})
|
||||
|
||||
@@ -11,8 +11,9 @@ add_executable(buffering-test)
|
||||
target_sources(buffering-test PRIVATE ${buffering_sources})
|
||||
target_link_libraries(
|
||||
buffering-test
|
||||
PRIVATE rocprofiler-sdk::rocprofiler-headers
|
||||
rocprofiler-sdk::rocprofiler-common-library GTest::gtest GTest::gtest_main)
|
||||
PRIVATE rocprofiler-sdk::rocprofiler-sdk-headers
|
||||
rocprofiler-sdk::rocprofiler-sdk-common-library GTest::gtest
|
||||
GTest::gtest_main)
|
||||
|
||||
gtest_add_tests(
|
||||
TARGET buffering-test
|
||||
|
||||
@@ -11,8 +11,9 @@ add_executable(common-tests)
|
||||
target_sources(common-tests PRIVATE ${common_sources})
|
||||
target_link_libraries(
|
||||
common-tests
|
||||
PRIVATE rocprofiler-sdk::rocprofiler-headers
|
||||
rocprofiler-sdk::rocprofiler-common-library GTest::gtest GTest::gtest_main)
|
||||
PRIVATE rocprofiler-sdk::rocprofiler-sdk-headers
|
||||
rocprofiler-sdk::rocprofiler-sdk-common-library GTest::gtest
|
||||
GTest::gtest_main)
|
||||
|
||||
gtest_add_tests(
|
||||
TARGET common-tests
|
||||
|
||||
@@ -7,7 +7,7 @@ set(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME "tools")
|
||||
add_executable(rocprofv3-trigger-list-metrics)
|
||||
target_sources(rocprofv3-trigger-list-metrics PRIVATE rocprofv3_trigger_list_metrics.cpp)
|
||||
target_link_libraries(rocprofv3-trigger-list-metrics
|
||||
PRIVATE rocprofiler-sdk::rocprofiler-hsa-runtime)
|
||||
PRIVATE rocprofiler-sdk::rocprofiler-sdk-hsa-runtime)
|
||||
set_target_properties(
|
||||
rocprofv3-trigger-list-metrics
|
||||
PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBEXECDIR}
|
||||
|
||||
@@ -22,7 +22,7 @@ add_test(NAME test-async-copy-tracing-execute COMMAND $<TARGET_FILE:transpose>)
|
||||
set(async-copy-tracing-env
|
||||
"${PRELOAD_ENV}"
|
||||
"ROCPROFILER_TOOL_OUTPUT_FILE=async-copy-tracing-test.json"
|
||||
"LD_LIBRARY_PATH=$<TARGET_FILE_DIR:rocprofiler-sdk::rocprofiler-shared-library>:$ENV{LD_LIBRARY_PATH}"
|
||||
"LD_LIBRARY_PATH=$<TARGET_FILE_DIR:rocprofiler-sdk::rocprofiler-sdk-shared-library>:$ENV{LD_LIBRARY_PATH}"
|
||||
)
|
||||
|
||||
set_tests_properties(
|
||||
|
||||
@@ -21,7 +21,7 @@ add_test(NAME test-c-tool-execute COMMAND $<TARGET_FILE:transpose> 1)
|
||||
|
||||
set(c-tool-env
|
||||
"${PRELOAD_ENV}"
|
||||
"LD_LIBRARY_PATH=$<TARGET_FILE_DIR:rocprofiler-sdk::rocprofiler-shared-library>:$ENV{LD_LIBRARY_PATH}"
|
||||
"LD_LIBRARY_PATH=$<TARGET_FILE_DIR:rocprofiler-sdk::rocprofiler-sdk-shared-library>:$ENV{LD_LIBRARY_PATH}"
|
||||
)
|
||||
|
||||
set_tests_properties(
|
||||
@@ -44,7 +44,7 @@ add_test(NAME test-c-tool-rocp-tool-lib-execute COMMAND $<TARGET_FILE:transpose>
|
||||
set(c-tool-rocp-tool-lib-env
|
||||
"${ROCPROFILER_MEMCHECK_PRELOAD_ENV}"
|
||||
"ROCP_TOOL_LIBRARIES=$<TARGET_FILE:rocprofiler-sdk-c-tool>"
|
||||
"LD_LIBRARY_PATH=$<TARGET_FILE_DIR:rocprofiler-sdk::rocprofiler-shared-library>:$ENV{LD_LIBRARY_PATH}"
|
||||
"LD_LIBRARY_PATH=$<TARGET_FILE_DIR:rocprofiler-sdk::rocprofiler-sdk-shared-library>:$ENV{LD_LIBRARY_PATH}"
|
||||
)
|
||||
|
||||
set_tests_properties(
|
||||
|
||||
@@ -37,22 +37,23 @@ set(AMDGPU_TARGETS
|
||||
FORCE)
|
||||
|
||||
# build flags
|
||||
add_library(rocprofiler-tests-build-flags INTERFACE)
|
||||
add_library(rocprofiler-sdk::tests-build-flags ALIAS rocprofiler-tests-build-flags)
|
||||
target_compile_options(rocprofiler-tests-build-flags INTERFACE -W -Wall -Wextra -Wshadow)
|
||||
target_compile_features(rocprofiler-tests-build-flags INTERFACE cxx_std_17)
|
||||
add_library(rocprofiler-sdk-tests-build-flags INTERFACE)
|
||||
add_library(rocprofiler-sdk::tests-build-flags ALIAS rocprofiler-sdk-tests-build-flags)
|
||||
target_compile_options(rocprofiler-sdk-tests-build-flags INTERFACE -W -Wall -Wextra
|
||||
-Wshadow)
|
||||
target_compile_features(rocprofiler-sdk-tests-build-flags INTERFACE cxx_std_17)
|
||||
|
||||
if(ROCPROFILER_BUILD_CI OR ROCPROFILER_BUILD_WERROR)
|
||||
target_compile_options(rocprofiler-tests-build-flags INTERFACE -Werror)
|
||||
target_compile_options(rocprofiler-sdk-tests-build-flags INTERFACE -Werror)
|
||||
endif()
|
||||
|
||||
# serialization library
|
||||
if(NOT TARGET rocprofiler-sdk::rocprofiler-cereal)
|
||||
if(NOT TARGET rocprofiler-sdk::rocprofiler-sdk-cereal)
|
||||
get_filename_component(ROCPROFILER_SOURCE_DIR "${PROJECT_SOURCE_DIR}/.." REALPATH)
|
||||
|
||||
add_library(rocprofiler-cereal INTERFACE)
|
||||
add_library(rocprofiler-sdk::rocprofiler-cereal ALIAS rocprofiler-cereal)
|
||||
target_compile_definitions(rocprofiler-cereal
|
||||
add_library(rocprofiler-sdk-cereal INTERFACE)
|
||||
add_library(rocprofiler-sdk::rocprofiler-sdk-cereal ALIAS rocprofiler-sdk-cereal)
|
||||
target_compile_definitions(rocprofiler-sdk-cereal
|
||||
INTERFACE $<BUILD_INTERFACE:CEREAL_THREAD_SAFE=1>)
|
||||
|
||||
if(EXISTS ${ROCPROFILER_SOURCE_DIR}/external AND COMMAND
|
||||
@@ -65,7 +66,7 @@ if(NOT TARGET rocprofiler-sdk::rocprofiler-cereal)
|
||||
REPO_BRANCH "rocprofiler")
|
||||
|
||||
target_include_directories(
|
||||
rocprofiler-cereal SYSTEM
|
||||
rocprofiler-sdk-cereal SYSTEM
|
||||
INTERFACE $<BUILD_INTERFACE:${ROCPROFILER_SOURCE_DIR}/external/cereal/include>
|
||||
)
|
||||
else()
|
||||
@@ -85,12 +86,12 @@ if(NOT TARGET rocprofiler-sdk::rocprofiler-cereal)
|
||||
endif()
|
||||
|
||||
target_include_directories(
|
||||
rocprofiler-cereal SYSTEM
|
||||
rocprofiler-sdk-cereal SYSTEM
|
||||
INTERFACE $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/external/cereal/include>)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT TARGET rocprofiler-sdk::rocprofiler-perfetto)
|
||||
if(NOT TARGET rocprofiler-sdk::rocprofiler-sdk-perfetto)
|
||||
# perfetto
|
||||
fetchcontent_declare(
|
||||
perfetto
|
||||
@@ -106,34 +107,35 @@ if(NOT TARGET rocprofiler-sdk::rocprofiler-perfetto)
|
||||
fetchcontent_populate(perfetto)
|
||||
endif()
|
||||
|
||||
add_library(rocprofiler-tests-perfetto STATIC)
|
||||
add_library(rocprofiler-sdk::tests-perfetto ALIAS rocprofiler-tests-perfetto)
|
||||
add_library(rocprofiler-sdk-tests-perfetto STATIC)
|
||||
add_library(rocprofiler-sdk::tests-perfetto ALIAS rocprofiler-sdk-tests-perfetto)
|
||||
target_sources(
|
||||
rocprofiler-tests-perfetto
|
||||
rocprofiler-sdk-tests-perfetto
|
||||
PRIVATE ${PROJECT_BINARY_DIR}/external/perfetto/sdk/perfetto.h
|
||||
${PROJECT_BINARY_DIR}/external/perfetto/sdk/perfetto.cc)
|
||||
target_include_directories(
|
||||
rocprofiler-tests-perfetto SYSTEM
|
||||
rocprofiler-sdk-tests-perfetto SYSTEM
|
||||
INTERFACE $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/external/perfetto/sdk>)
|
||||
set_target_properties(rocprofiler-tests-perfetto PROPERTIES POSITION_INDEPENDENT_CODE
|
||||
ON)
|
||||
set_target_properties(rocprofiler-sdk-tests-perfetto
|
||||
PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
else()
|
||||
add_library(rocprofiler-tests-perfetto INTERFACE)
|
||||
add_library(rocprofiler-sdk::tests-perfetto ALIAS rocprofiler-tests-perfetto)
|
||||
target_link_libraries(rocprofiler-tests-perfetto
|
||||
INTERFACE rocprofiler-sdk::rocprofiler-perfetto)
|
||||
add_library(rocprofiler-sdk-tests-perfetto INTERFACE)
|
||||
add_library(rocprofiler-sdk::tests-perfetto ALIAS rocprofiler-sdk-tests-perfetto)
|
||||
target_link_libraries(rocprofiler-sdk-tests-perfetto
|
||||
INTERFACE rocprofiler-sdk::rocprofiler-sdk-perfetto)
|
||||
endif()
|
||||
|
||||
# common utilities
|
||||
cmake_path(GET CMAKE_CURRENT_SOURCE_DIR PARENT_PATH COMMON_LIBRARY_INCLUDE_DIR)
|
||||
|
||||
add_library(rocprofiler-tests-common-library INTERFACE)
|
||||
add_library(rocprofiler-sdk::tests-common-library ALIAS rocprofiler-tests-common-library)
|
||||
add_library(rocprofiler-sdk-tests-common-library INTERFACE)
|
||||
add_library(rocprofiler-sdk::tests-common-library ALIAS
|
||||
rocprofiler-sdk-tests-common-library)
|
||||
target_link_libraries(
|
||||
rocprofiler-tests-common-library INTERFACE rocprofiler-sdk::tests-build-flags
|
||||
rocprofiler-sdk::rocprofiler-cereal)
|
||||
target_compile_features(rocprofiler-tests-common-library INTERFACE cxx_std_17)
|
||||
target_include_directories(rocprofiler-tests-common-library
|
||||
rocprofiler-sdk-tests-common-library
|
||||
INTERFACE rocprofiler-sdk::tests-build-flags rocprofiler-sdk::rocprofiler-sdk-cereal)
|
||||
target_compile_features(rocprofiler-sdk-tests-common-library INTERFACE cxx_std_17)
|
||||
target_include_directories(rocprofiler-sdk-tests-common-library
|
||||
INTERFACE ${COMMON_LIBRARY_INCLUDE_DIR})
|
||||
|
||||
set(EXTERNAL_SUBMODULE_DIR "${PROJECT_SOURCE_DIR}/../external")
|
||||
@@ -141,10 +143,10 @@ cmake_path(ABSOLUTE_PATH EXTERNAL_SUBMODULE_DIR NORMALIZE)
|
||||
|
||||
if(EXISTS ${EXTERNAL_SUBMODULE_DIR}/filesystem/include/ghc/filesystem.hpp)
|
||||
target_compile_definitions(
|
||||
rocprofiler-tests-common-library
|
||||
rocprofiler-sdk-tests-common-library
|
||||
INTERFACE $<BUILD_INTERFACE:ROCPROFILER_SAMPLES_HAS_GHC_LIB_FILESYSTEM=1>)
|
||||
target_include_directories(
|
||||
rocprofiler-tests-common-library SYSTEM
|
||||
rocprofiler-sdk-tests-common-library SYSTEM
|
||||
INTERFACE $<BUILD_INTERFACE:${EXTERNAL_SUBMODULE_DIR}/filesystem/include>)
|
||||
endif()
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ add_test(NAME test-hip-graph-tracing-execute COMMAND $<TARGET_FILE:hip-graph>)
|
||||
set(hip-graph-tracing-env
|
||||
"${PRELOAD_ENV}"
|
||||
"ROCPROFILER_TOOL_OUTPUT_FILE=hip-graph-tracing-test.json"
|
||||
"LD_LIBRARY_PATH=$<TARGET_FILE_DIR:rocprofiler-sdk::rocprofiler-shared-library>:$ENV{LD_LIBRARY_PATH}"
|
||||
"LD_LIBRARY_PATH=$<TARGET_FILE_DIR:rocprofiler-sdk::rocprofiler-sdk-shared-library>:$ENV{LD_LIBRARY_PATH}"
|
||||
"ROCPROFILER_TOOL_CONTEXTS=HIP_API_CALLBACK,HIP_API_BUFFERED,KERNEL_DISPATCH_CALLBACK,KERNEL_DISPATCH_BUFFERED,CODE_OBJECT"
|
||||
)
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ add_test(NAME test-kernel-tracing-execute COMMAND $<TARGET_FILE:reproducible-run
|
||||
set(kernel-tracing-env
|
||||
"${PRELOAD_ENV}"
|
||||
"ROCPROFILER_TOOL_OUTPUT_FILE=kernel-tracing-test.json"
|
||||
"LD_LIBRARY_PATH=$<TARGET_FILE_DIR:rocprofiler-sdk::rocprofiler-shared-library>:$ENV{LD_LIBRARY_PATH}"
|
||||
"LD_LIBRARY_PATH=$<TARGET_FILE_DIR:rocprofiler-sdk::rocprofiler-sdk-shared-library>:$ENV{LD_LIBRARY_PATH}"
|
||||
)
|
||||
|
||||
set_tests_properties(
|
||||
|
||||
@@ -22,7 +22,7 @@ add_test(NAME test-page-migration-execute COMMAND $<TARGET_FILE:page-migration>)
|
||||
set(page-migration-env
|
||||
"${PRELOAD_ENV}"
|
||||
"ROCPROFILER_TOOL_OUTPUT_FILE=page-migration-test.json"
|
||||
"LD_LIBRARY_PATH=$<TARGET_FILE_DIR:rocprofiler-sdk::rocprofiler-shared-library>:$ENV{LD_LIBRARY_PATH}"
|
||||
"LD_LIBRARY_PATH=$<TARGET_FILE_DIR:rocprofiler-sdk::rocprofiler-sdk-shared-library>:$ENV{LD_LIBRARY_PATH}"
|
||||
)
|
||||
|
||||
set_tests_properties(
|
||||
|
||||
@@ -22,7 +22,7 @@ add_test(NAME test-scratch-memory-tracing-execute COMMAND $<TARGET_FILE:scratch-
|
||||
set(scratch-memory-tracing-env
|
||||
"${PRELOAD_ENV}"
|
||||
"ROCPROFILER_TOOL_OUTPUT_FILE=scratch-memory-tracing-test.json"
|
||||
"LD_LIBRARY_PATH=$<TARGET_FILE_DIR:rocprofiler-sdk::rocprofiler-shared-library>:$ENV{LD_LIBRARY_PATH}"
|
||||
"LD_LIBRARY_PATH=$<TARGET_FILE_DIR:rocprofiler-sdk::rocprofiler-sdk-shared-library>:$ENV{LD_LIBRARY_PATH}"
|
||||
)
|
||||
|
||||
set_tests_properties(
|
||||
|
||||
@@ -15,7 +15,7 @@ add_library(rocprofiler-sdk-json-tool SHARED)
|
||||
target_sources(rocprofiler-sdk-json-tool PRIVATE json-tool.cpp)
|
||||
target_link_libraries(
|
||||
rocprofiler-sdk-json-tool
|
||||
PRIVATE rocprofiler-sdk::rocprofiler-sdk rocprofiler-sdk::rocprofiler-cereal
|
||||
PRIVATE rocprofiler-sdk::rocprofiler-sdk rocprofiler-sdk::rocprofiler-sdk-cereal
|
||||
rocprofiler-sdk::tests-build-flags rocprofiler-sdk::tests-common-library
|
||||
rocprofiler-sdk::tests-perfetto)
|
||||
set_target_properties(
|
||||
|
||||
Reference in New Issue
Block a user