CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
82 lines
2.4 KiB
CMake
82 lines
2.4 KiB
CMake
# Copyright (c) Advanced Micro Devices, Inc.
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
# ------------------------------------------------------------------------------#
|
|
#
|
|
# rocprofiler-systems user library
|
|
#
|
|
# ------------------------------------------------------------------------------#
|
|
|
|
set(CMAKE_SKIP_RPATH OFF)
|
|
set(BUILD_RPATH_USE_ORIGIN ON)
|
|
set(CMAKE_CXX_VISIBILITY_PRESET "hidden")
|
|
set(CMAKE_VISIBILITY_INLINES_HIDDEN ON)
|
|
|
|
add_library(rocprofiler-systems-user-library SHARED)
|
|
add_library(
|
|
rocprofiler-systems::rocprofiler-systems-user-library
|
|
ALIAS rocprofiler-systems-user-library
|
|
)
|
|
|
|
set(_user_headers
|
|
${CMAKE_CURRENT_SOURCE_DIR}/rocprofiler-systems/user.h
|
|
${CMAKE_CURRENT_SOURCE_DIR}/rocprofiler-systems/types.h
|
|
${CMAKE_CURRENT_SOURCE_DIR}/rocprofiler-systems/causal.h
|
|
${CMAKE_CURRENT_SOURCE_DIR}/rocprofiler-systems/categories.h
|
|
)
|
|
|
|
set(_user_sources ${CMAKE_CURRENT_SOURCE_DIR}/user.cpp)
|
|
|
|
target_sources(rocprofiler-systems-user-library PRIVATE ${_user_sources} ${_user_headers})
|
|
target_include_directories(
|
|
rocprofiler-systems-user-library
|
|
PUBLIC
|
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
|
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
|
)
|
|
target_link_libraries(
|
|
rocprofiler-systems-user-library
|
|
PRIVATE
|
|
$<BUILD_INTERFACE:rocprofiler-systems::rocprofiler-systems-compile-definitions>
|
|
)
|
|
|
|
set_target_properties(
|
|
rocprofiler-systems-user-library
|
|
PROPERTIES
|
|
OUTPUT_NAME ${BINARY_NAME_PREFIX}-user
|
|
VERSION ${PROJECT_VERSION}
|
|
SOVERSION ${PROJECT_VERSION_MAJOR}
|
|
POSITION_INDEPENDENT_CODE ON
|
|
BUILD_RPATH "\$ORIGIN"
|
|
INSTALL_RPATH "\$ORIGIN"
|
|
)
|
|
|
|
rocprofiler_systems_strip_target(rocprofiler-systems-user-library)
|
|
|
|
foreach(_HEADER ${_user_headers})
|
|
string(
|
|
REPLACE
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/rocprofiler-systems/"
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}/"
|
|
_DEST
|
|
${_HEADER}
|
|
)
|
|
string(
|
|
REPLACE
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/"
|
|
"${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_INCLUDEDIR}/"
|
|
_DEST
|
|
"${_DEST}"
|
|
)
|
|
|
|
configure_file(${_HEADER} ${_DEST} COPYONLY)
|
|
endforeach()
|
|
|
|
install(FILES ${_user_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME})
|
|
|
|
install(
|
|
TARGETS rocprofiler-systems-user-library
|
|
EXPORT rocprofiler-systems-library-targets
|
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
)
|