[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / mlir / examples / toy / Ch6 / CMakeLists.txt
blob283b895eb6bf4106be0440385340bfc4e541beff
1 # This chapter depends on JIT support enabled.
2 if(NOT MLIR_ENABLE_EXECUTION_ENGINE)
3   return()
4 endif()
7 # For a better template to copy, see examples/standalone
8 include_directories(include)
9 add_subdirectory(include)
11 set(LLVM_LINK_COMPONENTS
12   Core
13   Support
14   nativecodegen
15   OrcJIT
16   )
18 set(LLVM_TARGET_DEFINITIONS mlir/ToyCombine.td)
19 mlir_tablegen(ToyCombine.inc -gen-rewriters)
20 add_public_tablegen_target(ToyCh6CombineIncGen)
22 add_toy_chapter(toyc-ch6
23   toyc.cpp
24   parser/AST.cpp
25   mlir/MLIRGen.cpp
26   mlir/Dialect.cpp
27   mlir/LowerToAffineLoops.cpp
28   mlir/LowerToLLVM.cpp
29   mlir/ShapeInferencePass.cpp
30   mlir/ToyCombine.cpp
32   DEPENDS
33   ToyCh6ShapeInferenceInterfaceIncGen
34   ToyCh6OpsIncGen
35   ToyCh6CombineIncGen
36   )
38 include_directories(${CMAKE_CURRENT_BINARY_DIR})
39 include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/)
40 get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS)
41 get_property(conversion_libs GLOBAL PROPERTY MLIR_CONVERSION_LIBS)
42 get_property(extension_libs GLOBAL PROPERTY MLIR_EXTENSION_LIBS)
43 target_link_libraries(toyc-ch6
44   PRIVATE
45     ${dialect_libs}
46     ${conversion_libs}
47     ${extension_libs}
48     MLIRAnalysis
49     MLIRBuiltinToLLVMIRTranslation
50     MLIRCallInterfaces
51     MLIRCastInterfaces
52     MLIRExecutionEngine
53     MLIRFunctionInterfaces
54     MLIRIR
55     MLIRLLVMCommonConversion
56     MLIRLLVMDialect
57     MLIRLLVMToLLVMIRTranslation
58     MLIRMemRefDialect
59     MLIRParser
60     MLIRPass
61     MLIRSideEffectInterfaces
62     MLIRSupport
63     MLIRTargetLLVMIRExport
64     MLIRTransforms
65     )