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
131 lines
3.6 KiB
CMake
131 lines
3.6 KiB
CMake
# Copyright (c) Advanced Micro Devices, Inc.
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
# ------------------------------------------------------------------------------#
|
|
#
|
|
# rocprofiler-systems object library
|
|
#
|
|
# ------------------------------------------------------------------------------#
|
|
|
|
add_library(rocprofiler-systems-object-library OBJECT)
|
|
add_library(
|
|
rocprofiler-systems::rocprofiler-systems-object-library
|
|
ALIAS rocprofiler-systems-object-library
|
|
)
|
|
|
|
target_sources(
|
|
rocprofiler-systems-object-library
|
|
PRIVATE
|
|
${CMAKE_CURRENT_LIST_DIR}/library.cpp
|
|
${CMAKE_CURRENT_LIST_DIR}/regions.cpp
|
|
${CMAKE_CURRENT_LIST_DIR}/progress.cpp
|
|
${CMAKE_CURRENT_LIST_DIR}/api.cpp
|
|
${CMAKE_CURRENT_LIST_DIR}/timeout.cpp
|
|
${CMAKE_CURRENT_LIST_DIR}/api.hpp
|
|
)
|
|
|
|
add_subdirectory(library)
|
|
|
|
target_link_libraries(
|
|
rocprofiler-systems-object-library
|
|
PRIVATE rocprofiler-systems::rocprofiler-systems-interface-library
|
|
)
|
|
|
|
# Preserve frame pointers so that libunwind can reliably unwind through
|
|
# this code when the causal profiling sampling signal fires.
|
|
target_compile_options(
|
|
rocprofiler-systems-object-library
|
|
PRIVATE $<$<CXX_COMPILER_ID:Clang,AppleClang>:-fno-omit-frame-pointer>
|
|
)
|
|
|
|
# ------------------------------------------------------------------------------#
|
|
#
|
|
# rocprofiler-systems static library
|
|
#
|
|
# ------------------------------------------------------------------------------#
|
|
|
|
add_library(
|
|
rocprofiler-systems-static-library
|
|
STATIC
|
|
$<TARGET_OBJECTS:rocprofiler-systems-object-library>
|
|
)
|
|
|
|
target_sources(
|
|
rocprofiler-systems-static-library
|
|
PRIVATE $<TARGET_OBJECTS:rocprofiler-systems-pmc-library>
|
|
)
|
|
|
|
add_library(
|
|
rocprofiler-systems::librocprofiler-systems-static
|
|
ALIAS rocprofiler-systems-static-library
|
|
)
|
|
|
|
target_link_libraries(
|
|
rocprofiler-systems-static-library
|
|
PRIVATE
|
|
rocprofiler-systems::rocprofiler-systems-interface-library
|
|
rocprofiler-systems::rocprofiler-systems-core
|
|
rocprofiler-systems::rocprofiler-systems-binary
|
|
)
|
|
|
|
set_target_properties(
|
|
rocprofiler-systems-static-library
|
|
PROPERTIES OUTPUT_NAME ${BINARY_NAME_PREFIX}
|
|
)
|
|
|
|
# ------------------------------------------------------------------------------#
|
|
#
|
|
# rocprofiler-systems shared library
|
|
#
|
|
# ------------------------------------------------------------------------------#
|
|
|
|
add_library(
|
|
rocprofiler-systems-shared-library
|
|
SHARED
|
|
$<TARGET_OBJECTS:rocprofiler-systems-object-library>
|
|
)
|
|
|
|
target_sources(
|
|
rocprofiler-systems-shared-library
|
|
PRIVATE $<TARGET_OBJECTS:rocprofiler-systems-pmc-library>
|
|
)
|
|
|
|
add_library(
|
|
rocprofiler-systems::librocprofiler-systems-shared
|
|
ALIAS rocprofiler-systems-shared-library
|
|
)
|
|
add_library(
|
|
rocprofiler-systems::rocprofiler-systems-library
|
|
ALIAS rocprofiler-systems-shared-library
|
|
)
|
|
|
|
target_link_libraries(
|
|
rocprofiler-systems-shared-library
|
|
PRIVATE
|
|
rocprofiler-systems::rocprofiler-systems-interface-library
|
|
rocprofiler-systems::rocprofiler-systems-core
|
|
rocprofiler-systems::rocprofiler-systems-binary
|
|
)
|
|
|
|
target_link_options(
|
|
rocprofiler-systems-shared-library
|
|
PRIVATE "LINKER:--exclude-libs=ALL"
|
|
)
|
|
|
|
set_target_properties(
|
|
rocprofiler-systems-shared-library
|
|
PROPERTIES
|
|
OUTPUT_NAME ${BINARY_NAME_PREFIX}
|
|
VERSION ${PROJECT_VERSION}
|
|
SOVERSION ${PROJECT_VERSION_MAJOR}
|
|
INSTALL_RPATH "${ROCPROFSYS_LIB_INSTALL_RPATH}"
|
|
)
|
|
|
|
rocprofiler_systems_strip_target(rocprofiler-systems-shared-library)
|
|
|
|
install(
|
|
TARGETS rocprofiler-systems-shared-library
|
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
OPTIONAL
|
|
)
|