fafab6b713
* 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>
[ROCm/rocprofiler-sdk commit: 9a0c84efa6]
58 rader
1.7 KiB
CMake
58 rader
1.7 KiB
CMake
#
|
|
#
|
|
#
|
|
cmake_minimum_required(VERSION 3.21.0 FATAL_ERROR)
|
|
|
|
if(NOT CMAKE_HIP_COMPILER)
|
|
find_program(
|
|
amdclangpp_EXECUTABLE
|
|
NAMES amdclang++
|
|
HINTS ${ROCM_PATH} ENV ROCM_PATH /opt/rocm
|
|
PATHS ${ROCM_PATH} ENV ROCM_PATH /opt/rocm
|
|
PATH_SUFFIXES bin llvm/bin NO_CACHE)
|
|
mark_as_advanced(amdclangpp_EXECUTABLE)
|
|
|
|
if(amdclangpp_EXECUTABLE)
|
|
set(CMAKE_HIP_COMPILER "${amdclangpp_EXECUTABLE}")
|
|
endif()
|
|
endif()
|
|
|
|
project(rocprofiler-sdk-samples-intercept-table LANGUAGES CXX HIP)
|
|
|
|
foreach(_TYPE DEBUG MINSIZEREL RELEASE RELWITHDEBINFO)
|
|
if("${CMAKE_HIP_FLAGS_${_TYPE}}" STREQUAL "")
|
|
set(CMAKE_HIP_FLAGS_${_TYPE} "${CMAKE_CXX_FLAGS_${_TYPE}}")
|
|
endif()
|
|
endforeach()
|
|
|
|
find_package(rocprofiler-sdk REQUIRED)
|
|
|
|
add_library(intercept-table-client SHARED)
|
|
target_sources(intercept-table-client PRIVATE client.cpp client.hpp)
|
|
target_link_libraries(
|
|
intercept-table-client
|
|
PRIVATE rocprofiler::rocprofiler rocprofiler::samples-build-flags
|
|
rocprofiler::samples-common-library)
|
|
|
|
set_source_files_properties(main.cpp PROPERTIES LANGUAGE HIP)
|
|
find_package(Threads REQUIRED)
|
|
|
|
add_executable(intercept-table)
|
|
target_sources(intercept-table PRIVATE main.cpp)
|
|
target_link_libraries(intercept-table PRIVATE intercept-table-client Threads::Threads
|
|
rocprofiler::samples-build-flags)
|
|
|
|
add_test(NAME intercept-table COMMAND $<TARGET_FILE:intercept-table>)
|
|
|
|
set_tests_properties(
|
|
intercept-table
|
|
PROPERTIES
|
|
TIMEOUT
|
|
45
|
|
LABELS
|
|
"samples"
|
|
ENVIRONMENT
|
|
"${ROCPROFILER_MEMCHECK_PRELOAD_ENV};HSA_TOOLS_LIB=$<TARGET_FILE:rocprofiler::rocprofiler-shared-library>"
|
|
FAIL_REGULAR_EXPRESSION
|
|
"threw an exception")
|