CMakeLists.txt 1.0 KB
Newer Older
1
lite_cc_library(gen_code_lite SRCS gen_code.cc
Y
Yan Chunwei 已提交
2
        DEPS program_lite op_lite scope_lite
3 4 5 6
        cpp_op_desc_lite
        HVY_DEPS operator)
lite_cc_library(paddle_infer_gencode SRCS paddle_infer.cc DEPS program_lite utils_lite)

Y
Yan Chunwei 已提交
7
if (NOT LITE_WITH_LIGHT_WEIGHT_FRAMEWORK)
Y
Yan Chunwei 已提交
8 9 10 11 12 13 14 15
    lite_cc_test(test_gen_code_lite SRCS gen_code_test.cc DEPS gen_code_lite ${tensor_lite}
            mul_op_lite
            compatible_pb_lite
            model_parser_lite
            X86_DEPS mul_compute_x86
            ARM_DEPS mul_compute_arm
            ARGS --optimized_model=${LITE_MODEL_DIR}/lite_naive_model_opt SERIAL)

Y
Yan Chunwei 已提交
16 17 18 19
    lite_cc_library(__generated_code__
        SRCS ${CMAKE_BINARY_DIR}/paddle/fluid/lite/gen_code/__generated_code__.cc
        DEPS scope_lite op_lite kernel_lite paddle_infer_gencode
    )
20

Y
Yan Chunwei 已提交
21 22 23 24
    lite_cc_test(test_generated_code SRCS generated_code_test.cc DEPS __generated_code__
      ${ops_lite} ${host_kernels}
      X86_DEPS ${x86_kernels}
      )
25

Y
Yan Chunwei 已提交
26 27
    add_dependencies(__generated_code__ test_gen_code_lite)
endif()