9a0c84efa6
* Fix find_package(rocprofiler) in build tree * Move include/rocprofiler to include/rocprofiler-sdk * Update include/CMakeLists.txt - add_subdirectory(rocprofiler-sdk) * Move lib/rocprofiler to lib/rocprofiler-sdk * Move lib/rocprofiler-tool to lib/rocprofiler-sdk-tool * Update lib/CMakeLists.txt - add_subdirectory(rocprofiler-sdk) - add_subdirectory(rocprofiler-sdk-tool) * Update lib/rocprofiler-sdk/CMakeLists.txt * Rename rocprofiler-tool to rocprofiler-sdk-tool * Replace include rocprofiler/ with include rocprofiler-sdk/ * Replace include lib/rocprofiler/ with include lib/rocprofiler-sdk/ * Set VERSION to 0.0.0 and finish install to rocprofiler-sdk * More fixes for rocprofiler -> rocprofiler-sdk - fix issue with rocprofiler-sdk-config.cmake.in - fix counters xml install path * Fix documentation generation * Create rocprofiler_LIB_ROCPROFILER_SDK_DIR for build tree * cmake formatting (cmake-format) (#264) Co-authored-by: jrmadsen <jrmadsen@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
57 lines
1.9 KiB
CMake
57 lines
1.9 KiB
CMake
#
|
|
#
|
|
#
|
|
rocprofiler_deactivate_clang_tidy()
|
|
|
|
include(GoogleTest)
|
|
|
|
# -------------------------------------------------------------------------------------- #
|
|
#
|
|
# Link to static rocprofiler library
|
|
#
|
|
# -------------------------------------------------------------------------------------- #
|
|
|
|
set(rocprofiler_lib_sources agent.cpp buffer.cpp timestamp.cpp version.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 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 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 GTest::gtest GTest::gtest_main)
|
|
|
|
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_tests_properties(
|
|
${shared_lib_TESTS}
|
|
PROPERTIES TIMEOUT 360 LABELS "unittests" ENVIRONMENT
|
|
"HSA_TOOLS_LIB=$<TARGET_FILE:rocprofiler-shared-library>")
|