Use CMake EXCLUDE_FROM_ALL for composable kernels to avoid building of conv related kernels (#12855)

This commit is contained in:
cloudhan 2022-09-15 13:11:31 +08:00 committed by GitHub
parent d819b56fba
commit 10f9a69707
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,9 +11,13 @@ FetchContent_Declare(composable_kernel
PATCH_COMMAND git apply --reverse --check ${PATCH} || git apply --ignore-space-change --ignore-whitespace ${PATCH}
)
FetchContent_MakeAvailable(composable_kernel)
FetchContent_GetProperties(composable_kernel)
if(NOT composable_kernel_POPULATED)
FetchContent_Populate(composable_kernel)
add_subdirectory(${composable_kernel_SOURCE_DIR} ${composable_kernel_BINARY_DIR} EXCLUDE_FROM_ALL)
add_library(onnxruntime_composable_kernel_includes INTERFACE)
target_include_directories(onnxruntime_composable_kernel_includes INTERFACE
${composable_kernel_SOURCE_DIR}/include
${composable_kernel_SOURCE_DIR}/library/include)
add_library(onnxruntime_composable_kernel_includes INTERFACE)
target_include_directories(onnxruntime_composable_kernel_includes INTERFACE
${composable_kernel_SOURCE_DIR}/include
${composable_kernel_SOURCE_DIR}/library/include)
endif()