2023-08-24 15:39:56 -07:00
|
|
|
#
|
|
|
|
|
#
|
|
|
|
|
#
|
2023-09-21 10:07:07 -05:00
|
|
|
cmake_minimum_required(VERSION 3.21.0 FATAL_ERROR)
|
|
|
|
|
|
2023-11-29 20:43:18 -06:00
|
|
|
project(rocprofiler-sdk-samples LANGUAGES C CXX)
|
2023-08-08 18:39:01 -05:00
|
|
|
|
2023-12-15 14:39:13 -06:00
|
|
|
set(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME "samples")
|
2023-11-21 11:35:39 -06:00
|
|
|
if(CMAKE_BUILD_TYPE STREQUAL "")
|
|
|
|
|
set(CMAKE_BUILD_TYPE
|
|
|
|
|
"RelWithDebInfo"
|
|
|
|
|
CACHE STRING "Build type" FORCE)
|
|
|
|
|
endif()
|
|
|
|
|
|
2025-06-17 08:32:54 -05:00
|
|
|
if(NOT PROJECT_IS_TOP_LEVEL)
|
|
|
|
|
set(CMAKE_MESSAGE_INDENT "[${PROJECT_NAME}] ")
|
|
|
|
|
endif()
|
|
|
|
|
|
2024-01-24 16:32:54 -06:00
|
|
|
include(GNUInstallDirs)
|
|
|
|
|
|
|
|
|
|
# always use lib instead of lib64
|
|
|
|
|
set(CMAKE_INSTALL_LIBDIR "lib")
|
|
|
|
|
|
2025-06-30 15:07:37 -05:00
|
|
|
# this should be defaulted to OFF by ROCm 7.0.1 or 7.1 this should only used to disable
|
|
|
|
|
# sample tests in extreme circumstances
|
|
|
|
|
option(ROCPROFILER_DISABLE_UNSTABLE_CTESTS "Disable unstable tests" ON)
|
|
|
|
|
|
2023-11-21 11:35:39 -06:00
|
|
|
enable_testing()
|
|
|
|
|
include(CTest)
|
|
|
|
|
|
2025-03-22 18:51:42 -05:00
|
|
|
# generally needed
|
|
|
|
|
find_package(rocprofiler-sdk REQUIRED)
|
|
|
|
|
|
|
|
|
|
# get the gfx architectures that are present on the system
|
|
|
|
|
rocprofiler_sdk_get_gfx_architectures(rocprofiler-sdk-samples-gfx-info ECHO)
|
|
|
|
|
|
2023-11-28 10:04:37 -06:00
|
|
|
# common utilities for samples
|
|
|
|
|
add_subdirectory(common)
|
2023-09-21 14:35:20 -05:00
|
|
|
|
2023-11-28 10:04:37 -06:00
|
|
|
# actual samples
|
2023-09-20 19:32:02 -05:00
|
|
|
add_subdirectory(api_callback_tracing)
|
|
|
|
|
add_subdirectory(api_buffered_tracing)
|
2023-11-21 11:35:39 -06:00
|
|
|
add_subdirectory(code_object_tracing)
|
2023-10-16 13:41:40 -07:00
|
|
|
add_subdirectory(counter_collection)
|
2023-11-02 19:10:10 -05:00
|
|
|
add_subdirectory(intercept_table)
|
2024-05-03 18:45:47 -03:00
|
|
|
add_subdirectory(code_object_isa_decode)
|
2024-04-25 20:09:11 -05:00
|
|
|
add_subdirectory(external_correlation_id_request)
|
2024-05-24 09:49:44 -05:00
|
|
|
add_subdirectory(pc_sampling)
|
2025-03-14 00:29:07 -05:00
|
|
|
add_subdirectory(openmp_target)
|
2025-07-23 03:08:12 +02:00
|
|
|
add_subdirectory(thread_trace)
|