Update build for rocprofiler-library to support unit tests (#76)
* 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
[ROCm/rocprofiler-sdk commit: 5c07deb159]
This commit is contained in:
committed by
GitHub
parent
218666ebe9
commit
ba4c3a123e
@@ -5,7 +5,7 @@ cmake_minimum_required(VERSION 3.21.0 FATAL_ERROR)
|
||||
|
||||
project(rocprofiler-samples-pc-sampling LANGUAGES C CXX)
|
||||
|
||||
if(NOT TARGET rocprofiler::rocprofiler-library)
|
||||
if(NOT TARGET rocprofiler::rocprofiler)
|
||||
find_package(rocprofiler REQUIRED)
|
||||
endif()
|
||||
|
||||
@@ -14,7 +14,7 @@ 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-library
|
||||
PRIVATE rocprofiler::rocprofiler
|
||||
$<TARGET_NAME_IF_EXISTS:rocprofiler::samples-build-flags>)
|
||||
|
||||
add_executable(pc_sampling_single-user-host-trap-retry)
|
||||
@@ -22,7 +22,7 @@ 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-library
|
||||
PRIVATE rocprofiler::rocprofiler
|
||||
$<TARGET_NAME_IF_EXISTS:rocprofiler::samples-build-flags>)
|
||||
|
||||
add_executable(pc_sampling_single-user-multiple-agents)
|
||||
@@ -30,5 +30,5 @@ 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-library
|
||||
PRIVATE rocprofiler::rocprofiler
|
||||
$<TARGET_NAME_IF_EXISTS:rocprofiler::samples-build-flags>)
|
||||
|
||||
Reference in New Issue
Block a user