diff options
Diffstat (limited to 'mlir/examples/toy/Ch7/CMakeLists.txt')
| -rw-r--r-- | mlir/examples/toy/Ch7/CMakeLists.txt | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/mlir/examples/toy/Ch7/CMakeLists.txt b/mlir/examples/toy/Ch7/CMakeLists.txt new file mode 100644 index 00000000000..fc26425f038 --- /dev/null +++ b/mlir/examples/toy/Ch7/CMakeLists.txt @@ -0,0 +1,51 @@ +add_subdirectory(include) + +set(LLVM_LINK_COMPONENTS + Core + Support + ) + +set(LLVM_TARGET_DEFINITIONS mlir/ToyCombine.td) +mlir_tablegen(ToyCombine.inc -gen-rewriters "-I${CMAKE_CURRENT_SOURCE_DIR}/include") +add_public_tablegen_target(ToyCh7CombineIncGen) + +add_toy_chapter(toyc-ch7 + toyc.cpp + parser/AST.cpp + mlir/MLIRGen.cpp + mlir/Dialect.cpp + mlir/DeadFunctionEliminationPass.cpp + mlir/LowerToAffineLoops.cpp + mlir/LowerToLLVM.cpp + mlir/ShapeInferencePass.cpp + mlir/ToyCombine.cpp + ) + +add_dependencies(toyc-ch7 ToyCh7ShapeInferenceInterfaceIncGen) +add_dependencies(toyc-ch7 ToyCh7OpsIncGen) +add_dependencies(toyc-ch7 ToyCh7CombineIncGen) +add_dependencies(toyc-ch7 MLIRCallOpInterfacesIncGen) +include_directories(include/) +include_directories(${CMAKE_CURRENT_BINARY_DIR}) +include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/) +target_link_libraries(toyc-ch7 + PRIVATE + MLIRAffineOps + MLIRAnalysis + MLIRExecutionEngine + MLIRIR + MLIRLLVMIR + MLIRLoopToStandard + MLIRParser + MLIRPass + MLIRStandardOps + MLIRStandardToLLVM + MLIRTargetLLVMIR + MLIRTransforms + ) + +whole_archive_link(toyc-ch7 + MLIRAffineOps + MLIRLLVMIR + MLIRStandardOps + ) |

