CMakeLists.txt 684 字节
Newer Older
Y
Yan Chunwei 已提交
1 2 3 4 5 6 7 8 9 10
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(
11 12
  NAME run_and_check_external_kernels
  COMMAND
W
Wilber 已提交
13 14 15
    sh -c "${CMAKE_BINARY_DIR}/infrt/host_context/infrtexec -i ${basic_mlir} \
       --shared_libs=${external_kernels_lib} | \
                     ${LLVM_PATH}/bin/FileCheck ${basic_mlir}")