CMakeLists.txt 1.0 KB
Newer Older
T
tensor-tang 已提交
1

T
tensor-tang 已提交
2 3 4 5 6
set(jit_file ${PADDLE_BINARY_DIR}/paddle/fluid/operators/jit/kernels.h)
file(WRITE ${jit_file} "// Generated by the paddle/fluid/operators/jit/CMakeLists.txt.  DO NOT EDIT!\n\n")
file(APPEND ${jit_file} "\#pragma once\n")
file(APPEND ${jit_file} "\#include \"paddle/fluid/operators/jit/helper.h\"\n")
file(APPEND ${jit_file} "\#include \"paddle/fluid/operators/jit/registry.h\"\n\n")
T
tensor-tang 已提交
7

T
tensor-tang 已提交
8 9
set(JIT_KERNEL_DEPS cpu_info cblas gflags enforce place)

T
tensor-tang 已提交
10
file(GLOB jit_kernel_cc_srcs RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "*.cc")
T
tensor-tang 已提交
11
list(REMOVE_ITEM jit_kernel_cc_srcs test.cc benchmark.cc)
T
tensor-tang 已提交
12
cc_library(jit_kernel_base SRCS ${jit_kernel_cc_srcs} DEPS ${JIT_KERNEL_DEPS})
T
tensor-tang 已提交
13

T
tensor-tang 已提交
14
# refer must go first
T
tensor-tang 已提交
15
add_subdirectory(refer)
T
tensor-tang 已提交
16
add_subdirectory(more)
T
tensor-tang 已提交
17
if(WITH_XBYAK)
T
tensor-tang 已提交
18
    add_subdirectory(gen)
T
tensor-tang 已提交
19 20
endif()

T
tensor-tang 已提交
21 22
cc_library(jit_kernel_helper SRCS ${jit_kernel_cc_srcs} DEPS ${JIT_KERNEL_DEPS})
cc_test(jit_kernel_test SRCS test.cc DEPS jit_kernel_helper)
23
if(NOT WIN32)
T
tensor-tang 已提交
24
    cc_binary(jit_kernel_benchmark SRCS benchmark.cc DEPS jit_kernel_helper device_tracer)
25
endif()