Repository navigation
Expand file tree
/
Copy pathConfig.cmake.in
More file actions
29 lines (26 loc) · 1.54 KB
/
Copy pathConfig.cmake.in
File metadata and controls
29 lines (26 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
@PACKAGE_INIT@
set(_composable_kernel_supported_components device_other_operations device_gemm_operations device_conv_operations device_mha_operations device_contraction_operations device_reduction_operations utility)
# Per-target convolution libraries (device_conv_operations_<target>) are components only
# when their export file is installed next to this file, so an install assembled from
# several per-target builds offers exactly the targets it contains. Any component whose
# export file is missing is reported as not found instead of failing in include().
file(GLOB _composable_kernel_split_exports LIST_DIRECTORIES false
"${CMAKE_CURRENT_LIST_DIR}/composable_kerneldevice_conv_operations_*Targets.cmake")
foreach(_export ${_composable_kernel_split_exports})
get_filename_component(_export "${_export}" NAME)
string(REGEX REPLACE "^composable_kernel(device_conv_operations_.+)Targets\\.cmake$" "\\1" _export "${_export}")
list(APPEND _composable_kernel_supported_components "${_export}")
endforeach()
foreach(_comp ${composable_kernel_FIND_COMPONENTS})
if(_comp IN_LIST _composable_kernel_supported_components AND
EXISTS "${CMAKE_CURRENT_LIST_DIR}/composable_kernel${_comp}Targets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/composable_kernel${_comp}Targets.cmake")
set(composable_kernel_${_comp}_FOUND True)
else()
set(composable_kernel_${_comp}_FOUND False)
if(composable_kernel_FIND_REQUIRED_${_comp})
set(composable_kernel_FOUND False)
set(composable_kernel_NOT_FOUND_MESSAGE "Unsupported component: ${_comp}")
endif()
endif()
endforeach()