1 # Tell Tablegen to use MyExtension.td as input.
2 set(LLVM_TARGET_DEFINITIONS MyExtension.td)
4 # Ask Tablegen to generate op declarations and definitions from ODS.
5 mlir_tablegen(MyExtension.h.inc -gen-op-decls)
6 mlir_tablegen(MyExtension.cpp.inc -gen-op-defs)
8 # Add a CMakeTarget we can depend on to ensure the generation happens before the compilation.
9 add_public_tablegen_target(MyExtensionCh2IncGen)
11 # Don't forget to generate the documentation, this will produce a
12 # MyExtensionCh2.md under Tutorials/transform
13 add_mlir_doc(MyExtension MyExtensionCh2 Tutorials/transform/ -gen-op-doc)