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
81 lines
2.8 KiB
CMake
81 lines
2.8 KiB
CMake
# -------------------------------------------------------------------------------------- #
|
|
# package initialization
|
|
#
|
|
@PACKAGE_INIT@
|
|
|
|
cmake_minimum_required(VERSION 3.8)
|
|
|
|
# -------------------------------------------------------------------------------------- #
|
|
# basic paths
|
|
#
|
|
set_and_check(PTL_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@")
|
|
set_and_check(PTL_LIB_DIR "@PACKAGE_LIB_INSTALL_DIR@")
|
|
|
|
# -------------------------------------------------------------------------------------- #
|
|
# available components
|
|
#
|
|
set(PTL_shared_FOUND @BUILD_SHARED_LIBS@)
|
|
set(PTL_static_FOUND @BUILD_STATIC_LIBS@)
|
|
set(PTL_TBB_FOUND @PTL_USE_TBB@)
|
|
|
|
# Early check so later setup doesn't need to check REQUIRED status
|
|
check_required_components(PTL)
|
|
|
|
# -------------------------------------------------------------------------------------- #
|
|
# refind needed dependencies/targets
|
|
#
|
|
include(CMakeFindDependencyMacro)
|
|
|
|
if(NOT Threads_FOUND)
|
|
set(CMAKE_THREAD_PREFER_PTHREAD @CMAKE_THREAD_PREFER_PTHREAD@)
|
|
set(THREADS_PREFER_PTHREAD_FLAG @THREADS_PREFER_PTHREAD_FLAG@)
|
|
find_dependency(Threads REQUIRED)
|
|
endif()
|
|
|
|
if(NOT TBB_FOUND AND PTL_TBB_FOUND)
|
|
list(INSERT CMAKE_MODULE_PATH 0 "@PACKAGE_CMAKE_MODULE_INSTALL_DIR@")
|
|
find_dependency(TBB @TBB_VERSION@ REQUIRED)
|
|
list(REMOVE_AT CMAKE_MODULE_PATH 0)
|
|
endif()
|
|
|
|
# -------------------------------------------------------------------------------------- #
|
|
# Include our targets file(s)
|
|
#
|
|
include("${CMAKE_CURRENT_LIST_DIR}/PTLTargets.cmake")
|
|
|
|
# Set the default component based on what's available
|
|
if(PTL_shared_FOUND)
|
|
set(_ptl_preferred_link "shared")
|
|
else()
|
|
set(_ptl_preferred_link "static")
|
|
endif()
|
|
|
|
# Override if user has specified "static" alone as a component. Earlier check handles case
|
|
# that components are REQUIRED. Only change preferred link only changed if available to
|
|
# cover OPTIONAL case
|
|
if(("static" IN_LIST PTL_FIND_COMPONENTS) AND NOT ("shared" IN_LIST PTL_FIND_COMPONENTS))
|
|
if(PTL_static_FOUND)
|
|
set(_ptl_preferred_link "static")
|
|
endif()
|
|
endif()
|
|
|
|
# -------------------------------------------------------------------------------------- #
|
|
# Set old style variables for include/linking
|
|
#
|
|
set(PTL_INCLUDE_DIRS ${PTL_INCLUDE_DIR})
|
|
set(PTL_LIBRARIES PTL::ptl-${_ptl_preferred_link})
|
|
|
|
# -------------------------------------------------------------------------------------- #
|
|
# Create "transparent" link target that interfaces to shared/static on basis of
|
|
# availability or requested linking option
|
|
#
|
|
if(NOT TARGET PTL::ptl)
|
|
add_library(PTL::ptl INTERFACE IMPORTED)
|
|
target_link_libraries(PTL::ptl INTERFACE ${PTL_LIBRARIES})
|
|
# Needed to distinguish DLL/Lib, but symbol never used in code. Should also be a
|
|
# public symbol of ptl-static
|
|
if(WIN32)
|
|
target_compile_definitions(PTL::ptl INTERFACE _PTL_ARCHIVE)
|
|
endif()
|
|
endif()
|