60 lines · plain
1# This chapter depends on JIT support enabled.2if(NOT MLIR_ENABLE_EXECUTION_ENGINE)3 return()4endif()5 6# For a better template to copy, see examples/standalone7include_directories(include)8add_subdirectory(include)9 10set(LLVM_LINK_COMPONENTS11 Core12 Support13 nativecodegen14 OrcJIT15 )16 17set(LLVM_TARGET_DEFINITIONS mlir/ToyCombine.td)18mlir_tablegen(ToyCombine.inc -gen-rewriters)19add_public_tablegen_target(ToyCh7CombineIncGen)20 21add_toy_chapter(toyc-ch722 toyc.cpp23 parser/AST.cpp24 mlir/MLIRGen.cpp25 mlir/Dialect.cpp26 mlir/LowerToAffineLoops.cpp27 mlir/LowerToLLVM.cpp28 mlir/ShapeInferencePass.cpp29 mlir/ToyCombine.cpp30 31 DEPENDS32 ToyCh7ShapeInferenceInterfaceIncGen33 ToyCh7OpsIncGen34 ToyCh7CombineIncGen35 )36 37include_directories(${CMAKE_CURRENT_BINARY_DIR})38include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/)39target_link_libraries(toyc-ch740 PRIVATE41 MLIRAnalysis42 MLIRBuiltinToLLVMIRTranslation43 MLIRCallInterfaces44 MLIRCastInterfaces45 MLIRExecutionEngine46 MLIRFunctionInterfaces47 MLIRIR48 MLIRLLVMCommonConversion49 MLIRLLVMToLLVMIRTranslation50 MLIRMemRefDialect51 MLIRParser52 MLIRPass53 MLIRRegisterAllDialects54 MLIRRegisterAllExtensions55 MLIRRegisterAllPasses56 MLIRSideEffectInterfaces57 MLIRTargetLLVMIRExport58 MLIRTransforms59 )60