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
69 lines
2.1 KiB
CMake
69 lines
2.1 KiB
CMake
# Copyright (c) Advanced Micro Devices, Inc.
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
# ------------------------------------------------------------------------------#
|
|
#
|
|
# rocprofiler-systems dl library
|
|
#
|
|
# ------------------------------------------------------------------------------#
|
|
|
|
set(CMAKE_SKIP_RPATH OFF)
|
|
set(CMAKE_BUILD_RPATH_USE_ORIGIN ON)
|
|
set(CMAKE_CXX_VISIBILITY_PRESET "internal")
|
|
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
|
|
|
find_package(Threads REQUIRED)
|
|
|
|
add_library(rocprofiler-systems-dl-library SHARED)
|
|
add_library(
|
|
rocprofiler-systems::rocprofiler-systems-dl-library
|
|
ALIAS rocprofiler-systems-dl-library
|
|
)
|
|
|
|
target_sources(
|
|
rocprofiler-systems-dl-library
|
|
PRIVATE
|
|
${CMAKE_CURRENT_SOURCE_DIR}/dl.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/main.c
|
|
${CMAKE_CURRENT_SOURCE_DIR}/dl/dl.hpp
|
|
)
|
|
target_include_directories(
|
|
rocprofiler-systems-dl-library
|
|
PUBLIC
|
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../rocprof-sys-user>
|
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/../rocprof-sys>
|
|
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
|
PRIVATE ${rocprofiler-sdk_INCLUDE_DIR}
|
|
)
|
|
target_link_libraries(
|
|
rocprofiler-systems-dl-library
|
|
PUBLIC
|
|
$<BUILD_INTERFACE:${dl_LIBRARY}>
|
|
$<BUILD_INTERFACE:rocprofiler-systems::common-library>
|
|
$<BUILD_INTERFACE:rocprofiler-systems::rocprofiler-systems-compile-definitions>
|
|
$<BUILD_INTERFACE:Threads::Threads>
|
|
)
|
|
|
|
add_target_cxx_flag_if_avail(rocprofiler-systems-dl-library "-ftls-model=global-dynamic")
|
|
add_target_cxx_flag_if_avail(rocprofiler-systems-dl-library "-g3")
|
|
|
|
set_target_properties(
|
|
rocprofiler-systems-dl-library
|
|
PROPERTIES
|
|
OUTPUT_NAME ${BINARY_NAME_PREFIX}-dl
|
|
VERSION ${PROJECT_VERSION}
|
|
SOVERSION ${PROJECT_VERSION_MAJOR}
|
|
BUILD_RPATH "\$ORIGIN"
|
|
INSTALL_RPATH "\$ORIGIN"
|
|
)
|
|
|
|
rocprofiler_systems_strip_target(rocprofiler-systems-dl-library)
|
|
|
|
install(
|
|
FILES ${CMAKE_CURRENT_SOURCE_DIR}/dl/dl.hpp
|
|
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}/dl
|
|
)
|
|
|
|
install(TARGETS rocprofiler-systems-dl-library DESTINATION ${CMAKE_INSTALL_LIBDIR})
|