5c07deb159
* Update build for rocprofiler-library - Build rocprofiler OBJECT library (rocprofiler-object-library) - Generate rocprofiler shared library via rocprofiler-object-library - Generate rocprofiler static library via rocprofiler-object-library - this target is excluded from all target and, thus, is only built when another target links to it * Update lib/rocprofiler/CMakeLists.txt - tweak order of EXCLUDE_FROM_ALL and STATIC in add_library(rocprofiler-static-library ...) * Update samples - link against rocprofiler::rocprofiler instead of rocprofiler::rocprofiler-library following target renaming * Update cmake - fix PROJECT_BUILD_TARGETS for rocprofiler::rocprofiler target in rocprofiler-config.cmake - disable <OS>-<VERSION> in CPack package name - Add ROCPROFILER_BUILD_CODECOV option
35 rivejä
1.3 KiB
CMake
35 rivejä
1.3 KiB
CMake
#
|
|
#
|
|
#
|
|
cmake_minimum_required(VERSION 3.21.0 FATAL_ERROR)
|
|
|
|
project(rocprofiler-samples-pc-sampling LANGUAGES C CXX)
|
|
|
|
if(NOT TARGET rocprofiler::rocprofiler)
|
|
find_package(rocprofiler REQUIRED)
|
|
endif()
|
|
|
|
add_executable(pc_sampling_single-user-host-trap)
|
|
target_sources(pc_sampling_single-user-host-trap PRIVATE common.h
|
|
single-user-host-trap.cpp)
|
|
target_link_libraries(
|
|
pc_sampling_single-user-host-trap
|
|
PRIVATE rocprofiler::rocprofiler
|
|
$<TARGET_NAME_IF_EXISTS:rocprofiler::samples-build-flags>)
|
|
|
|
add_executable(pc_sampling_single-user-host-trap-retry)
|
|
target_sources(pc_sampling_single-user-host-trap-retry
|
|
PRIVATE common.h single-user-host-trap-retries-service-instantiation.cpp)
|
|
target_link_libraries(
|
|
pc_sampling_single-user-host-trap-retry
|
|
PRIVATE rocprofiler::rocprofiler
|
|
$<TARGET_NAME_IF_EXISTS:rocprofiler::samples-build-flags>)
|
|
|
|
add_executable(pc_sampling_single-user-multiple-agents)
|
|
target_sources(pc_sampling_single-user-multiple-agents
|
|
PRIVATE common.h single-user-multiple-agents.cpp)
|
|
target_link_libraries(
|
|
pc_sampling_single-user-multiple-agents
|
|
PRIVATE rocprofiler::rocprofiler
|
|
$<TARGET_NAME_IF_EXISTS:rocprofiler::samples-build-flags>)
|