1de44447f4
* Initial barrier * Working on profiler serializer extraction * Current progress * Serializtion Support * source formatting (clang-format v11) (#583) Co-authored-by: bwelton <1683479+bwelton@users.noreply.github.com> * cmake formatting (cmake-format) (#584) Co-authored-by: bwelton <1683479+bwelton@users.noreply.github.com> * Minor fix * Current Progress * Current progress * More fixes * Serialization Fixes * Bug fix * source formatting (clang-format v11) (#600) Co-authored-by: bwelton <1683479+bwelton@users.noreply.github.com> * More fixes * More minor fixes * source formatting (clang-format v11) (#603) Co-authored-by: bwelton <1683479+bwelton@users.noreply.github.com> * source formatting (clang-format v11) (#604) Co-authored-by: bwelton <1683479+bwelton@users.noreply.github.com> * Lock order inversion false positive * order fix * More changes * source formatting (clang-format v11) (#607) Co-authored-by: bwelton <1683479+bwelton@users.noreply.github.com> * minor test fix * Minor test changes --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: bwelton <1683479+bwelton@users.noreply.github.com>
68 wiersze
2.5 KiB
CMake
68 wiersze
2.5 KiB
CMake
#
|
|
#
|
|
#
|
|
rocprofiler_deactivate_clang_tidy()
|
|
|
|
include(GoogleTest)
|
|
|
|
# -------------------------------------------------------------------------------------- #
|
|
#
|
|
# Link to static rocprofiler library
|
|
#
|
|
# -------------------------------------------------------------------------------------- #
|
|
|
|
set(rocprofiler_lib_sources agent.cpp buffer.cpp hsa.cpp naming.cpp timestamp.cpp
|
|
version.cpp hsa_barrier.cpp)
|
|
|
|
add_executable(rocprofiler-lib-tests)
|
|
target_sources(rocprofiler-lib-tests PRIVATE ${rocprofiler_lib_sources} details/agent.cpp)
|
|
target_link_libraries(
|
|
rocprofiler-lib-tests
|
|
PRIVATE rocprofiler::rocprofiler-static-library
|
|
rocprofiler::rocprofiler-common-library rocprofiler::rocprofiler-hsa-runtime
|
|
GTest::gtest GTest::gtest_main)
|
|
|
|
gtest_add_tests(
|
|
TARGET rocprofiler-lib-tests
|
|
SOURCES ${rocprofiler_lib_sources}
|
|
TEST_LIST lib_TESTS
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
set_tests_properties(${lib_TESTS} PROPERTIES TIMEOUT 45 LABELS "unittests")
|
|
|
|
# -------------------------------------------------------------------------------------- #
|
|
#
|
|
# Link to shared rocprofiler library
|
|
#
|
|
# -------------------------------------------------------------------------------------- #
|
|
|
|
set(rocprofiler_shared_lib_sources external_correlation.cpp intercept_table.cpp
|
|
registration.cpp roctx.cpp status.cpp)
|
|
|
|
add_executable(rocprofiler-lib-tests-shared)
|
|
target_sources(rocprofiler-lib-tests-shared PRIVATE ${rocprofiler_shared_lib_sources})
|
|
target_link_libraries(
|
|
rocprofiler-lib-tests-shared
|
|
PRIVATE rocprofiler::rocprofiler-shared-library
|
|
rocprofiler::rocprofiler-common-library
|
|
rocprofiler::rocprofiler-hsa-runtime
|
|
rocprofiler::rocprofiler-sdk-roctx-shared-library
|
|
GTest::gtest
|
|
GTest::gtest_main)
|
|
set_target_properties(rocprofiler-lib-tests-shared PROPERTIES BUILD_RPATH
|
|
"\$ORIGIN/../lib")
|
|
|
|
gtest_add_tests(
|
|
TARGET rocprofiler-lib-tests-shared
|
|
SOURCES ${rocprofiler_shared_lib_sources}
|
|
TEST_LIST shared_lib_TESTS
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
set(rocprofiler-lib-tests-env
|
|
"HSA_TOOLS_LIB=$<TARGET_FILE:rocprofiler-shared-library>"
|
|
"LD_LIBRARY_PATH=${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}:$ENV{LD_LIBRARY_PATH}")
|
|
|
|
set_tests_properties(
|
|
${shared_lib_TESTS} PROPERTIES TIMEOUT 360 LABELS "unittests" ENVIRONMENT
|
|
"${rocprofiler-lib-tests-env}")
|