CMakeLists.txt 685 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11
set(op_utils_header ${PADDLE_BINARY_DIR}/paddle/pten/ops/compat/signatures.h.tmp CACHE INTERNAL "op_args_fns.cc file")
set(op_utils_header_final ${PADDLE_BINARY_DIR}/paddle/pten/ops/compat/signatures.h)
file(WRITE ${op_utils_header} "// Generated by the paddle/pten/ops/compat/CMakeLists.txt.  DO NOT EDIT!\n\n")
file(APPEND ${op_utils_header} "#include \"paddle/pten/core/compat/op_utils.h\"\n\n")

# Automatically generate the registration code of all arg map functions
# and compile the corresponding target to avoid frequent code conflicts
# when writing to same file
register_op_utils(op_compat_infos DEPS op_utils)

copy_if_different(${op_utils_header} ${op_utils_header_final})