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
@@ -25,7 +25,7 @@ foreach(_TYPE DEBUG MINSIZEREL RELEASE RELWITHDEBINFO)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if(NOT TARGET rocprofiler::rocprofiler-library)
|
||||
if(NOT TARGET rocprofiler::rocprofiler)
|
||||
find_package(rocprofiler REQUIRED)
|
||||
endif()
|
||||
|
||||
@@ -33,7 +33,7 @@ add_library(callback-api-tracing-client SHARED)
|
||||
target_sources(callback-api-tracing-client PRIVATE client.cpp client.hpp)
|
||||
target_link_libraries(
|
||||
callback-api-tracing-client
|
||||
PRIVATE rocprofiler::rocprofiler-library
|
||||
PRIVATE rocprofiler::rocprofiler
|
||||
$<TARGET_NAME_IF_EXISTS:rocprofiler::samples-build-flags>)
|
||||
|
||||
set_source_files_properties(main.cpp PROPERTIES LANGUAGE HIP)
|
||||
@@ -56,5 +56,5 @@ set_tests_properties(
|
||||
LABELS
|
||||
"samples"
|
||||
ENVIRONMENT
|
||||
"${ROCPROFILER_MEMCHECK_PRELOAD_ENV};HSA_TOOLS_LIB=$<TARGET_FILE:rocprofiler::rocprofiler-library>"
|
||||
"${ROCPROFILER_MEMCHECK_PRELOAD_ENV};HSA_TOOLS_LIB=$<TARGET_FILE:rocprofiler::rocprofiler>"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user