74facf87a6
* 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 ...)`
31 linhas
1.0 KiB
CMake
31 linhas
1.0 KiB
CMake
rocprofiler_deactivate_clang_tidy()
|
|
|
|
include(GoogleTest)
|
|
|
|
set(ROCPROFILER_LIB_PC_SAMPLING_TEST_SOURCES
|
|
configure_service.cpp cid_manager.cpp
|
|
# samples_processing.cpp
|
|
pc_sampling_vs_counter_collection.cpp query_configuration.cpp)
|
|
set(ROCPROFILER_LIB_PC_SAMPLING_TEST_HEADERS pc_sampling_internals.hpp)
|
|
|
|
add_executable(pcs-test)
|
|
|
|
target_sources(pcs-test PRIVATE ${ROCPROFILER_LIB_PC_SAMPLING_TEST_SOURCES}
|
|
${ROCPROFILER_LIB_PC_SAMPLING_TEST_HEADERS})
|
|
|
|
target_link_libraries(
|
|
pcs-test
|
|
PRIVATE rocprofiler-sdk::rocprofiler-sdk-common-library
|
|
rocprofiler-sdk::rocprofiler-sdk-static-library GTest::gtest
|
|
GTest::gtest_main)
|
|
|
|
gtest_add_tests(
|
|
TARGET pcs-test
|
|
SOURCES ${ROCPROFILER_LIB_COUNTER_TEST_SOURCES}
|
|
TEST_LIST pcs-tests_TESTS
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
set_tests_properties(
|
|
${pcs-tests_TESTS} PROPERTIES TIMEOUT 45 LABELS "unittests;pc-sampling"
|
|
SKIP_REGULAR_EXPRESSION "PC sampling unavailable")
|