NFC: Split out ToyOpsIncGen into a separate CMakeLists.txt.

This fixes an issue with make where it fails to properly handle the dependency ordering.

PiperOrigin-RevId: 274897702
This commit is contained in:
River Riddle 2019-10-15 15:09:45 -07:00 committed by A. Unique TensorFlower
parent 1f83316a6b
commit 050241ed3d
6 changed files with 13 additions and 10 deletions

View File

@ -1,8 +1,4 @@
set(LLVM_TARGET_DEFINITIONS include/toy/Ops.td)
mlir_tablegen(include/toy/Ops.h.inc -gen-op-decls)
mlir_tablegen(include/toy/Ops.cpp.inc -gen-op-defs)
add_public_tablegen_target(ToyCh2OpsIncGen)
add_subdirectory(include)
set(LLVM_LINK_COMPONENTS
Support

View File

@ -0,0 +1 @@
add_subdirectory(toy)

View File

@ -0,0 +1,4 @@
set(LLVM_TARGET_DEFINITIONS Ops.td)
mlir_tablegen(Ops.h.inc -gen-op-decls)
mlir_tablegen(Ops.cpp.inc -gen-op-defs)
add_public_tablegen_target(ToyCh2OpsIncGen)

View File

@ -1,12 +1,9 @@
add_subdirectory(include)
set(LLVM_LINK_COMPONENTS
Support
)
set(LLVM_TARGET_DEFINITIONS include/toy/Ops.td)
mlir_tablegen(include/toy/Ops.h.inc -gen-op-decls)
mlir_tablegen(include/toy/Ops.cpp.inc -gen-op-defs)
add_public_tablegen_target(ToyCh3OpsIncGen)
set(LLVM_TARGET_DEFINITIONS mlir/ToyCombine.td)
mlir_tablegen(ToyCombine.inc -gen-rewriters "-I${CMAKE_CURRENT_SOURCE_DIR}/include")
add_public_tablegen_target(ToyCh3CombineIncGen)

View File

@ -0,0 +1 @@
add_subdirectory(toy)

View File

@ -0,0 +1,4 @@
set(LLVM_TARGET_DEFINITIONS Ops.td)
mlir_tablegen(Ops.h.inc -gen-op-decls)
mlir_tablegen(Ops.cpp.inc -gen-op-defs)
add_public_tablegen_target(ToyCh3OpsIncGen)