Files
rocm-systems/projects/rocprofiler-systems/cmake/DyninstTBBInstall.cmake
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

47 lines
1.5 KiB
CMake
Raw Normal View History

2025-06-06 22:52:23 -04:00
# ########################################################################################
# ThreadingBuildingBlocks.cmake
#
# Install Intel's Threading Building Blocks for Dyninst
#
# The default TBB build does not have an 'install' target, so we have to do it manually.
# This file contains the necessary CMake commands to complete the installation assuming it
# has been built using ExternalProject_Add.
#
# ########################################################################################
cmake_minimum_required(VERSION 3.21)
2025-06-06 22:52:23 -04:00
if(NOT CMAKE_STRIP)
find_program(CMAKE_STRIP NAMES strip)
endif()
file(MAKE_DIRECTORY ${LIBDIR} ${INCDIR})
file(
COPY ${PREFIX}/src/tbb_release/
DESTINATION ${LIBDIR}
FILES_MATCHING
2025-06-22 10:44:33 -04:00
PATTERN "*.so.*"
)
2025-06-06 22:52:23 -04:00
file(COPY ${PREFIX}/src/rocprofiler-systems-tbb-build/include/tbb DESTINATION ${INCDIR})
file(GLOB _tbb_libs ${LIBDIR}/libtbb*.so.*)
foreach(_lib ${_tbb_libs})
string(REGEX REPLACE "\\.2$" "" _lib_short ${_lib})
get_filename_component(_lib "${_lib}" NAME)
2025-06-22 10:44:33 -04:00
execute_process(
COMMAND ${CMAKE_COMMAND} -E create_symlink ${_lib} ${_lib_short}
WORKING_DIRECTORY ${LIBDIR}
)
2025-06-06 22:52:23 -04:00
endforeach()
foreach(_lib ${_tbb_libs})
get_filename_component(_lib_realpath "${_lib}" REALPATH)
if(NOT "${_lib_realpath}" IN_LIST _tbb_libs_realpath)
list(APPEND _tbb_libs_realpath ${_lib_realpath})
endif()
endforeach()
foreach(_lib ${_tbb_libs_realpath})
execute_process(COMMAND ${CMAKE_STRIP} ${_lib})
endforeach()