CMakeLists.txt 653 字节
Newer Older
Y
Yan Chunwei 已提交
1 2 3 4 5 6 7 8 9 10 11
set(external_kernels_src "basic_kernels.cc")

cc_library(external_kernels SHARED SRCS ${external_kernels_src})
set_target_properties(external_kernels PROPERTIES LINK_FLAGS "${LINK_FLAGS}")

set(basic_mlir "${CMAKE_CURRENT_SOURCE_DIR}/basic.mlir")
set(external_kernels_lib "${CMAKE_CURRENT_BINARY_DIR}/libexternal_kernels.so")
message(STATUS "basic_mlir: ${basic_mlir}")
message(STATUS "external_kernels_lib: ${external_kernels_lib}")
add_test(
    NAME run_and_check_external_kernels
12
    COMMAND sh -c "${CMAKE_BINARY_DIR}/infrt/host_context/infrtexec -i ${basic_mlir} --shared_libs=${external_kernels_lib} | ${LLVM_PATH}/bin/FileCheck ${basic_mlir}"
Y
Yan Chunwei 已提交
13
)