1# For a better template to copy, see examples/standalone
2include_directories(include)
3add_subdirectory(include)
4
5set(LLVM_LINK_COMPONENTS
6  Support
7  )
8
9set(LLVM_TARGET_DEFINITIONS mlir/ToyCombine.td)
10mlir_tablegen(ToyCombine.inc -gen-rewriters)
11add_public_tablegen_target(ToyCh5CombineIncGen)
12
13add_toy_chapter(toyc-ch5
14  toyc.cpp
15  parser/AST.cpp
16  mlir/MLIRGen.cpp
17  mlir/Dialect.cpp
18  mlir/LowerToAffineLoops.cpp
19  mlir/ShapeInferencePass.cpp
20  mlir/ToyCombine.cpp
21
22  DEPENDS
23  ToyCh5ShapeInferenceInterfaceIncGen
24  ToyCh5OpsIncGen
25  ToyCh5CombineIncGen
26  )
27
28include_directories(${CMAKE_CURRENT_BINARY_DIR})
29include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/)
30get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS)
31target_link_libraries(toyc-ch5
32  PRIVATE
33    ${dialect_libs}
34    MLIRAnalysis
35    MLIRCallInterfaces
36    MLIRIR
37    MLIRParser
38    MLIRPass
39    MLIRSideEffectInterfaces
40    MLIRSupport
41    MLIRTransforms)
42