Fix GCC build problem with 288f05f related to SmallVector. (#116958)
[llvm-project.git] / mlir / test / lib / Dialect / Test / CMakeLists.txt
blob967101242e26b503e32be6b2ccc6eda27701a721
1 set(LLVM_OPTIONAL_SOURCES
2   TestDialect.cpp
3   TestPatterns.cpp
4   TestTraits.cpp
5   TestFromLLVMIRTranslation.cpp
6   TestToLLVMIRTranslation.cpp
9 set(LLVM_TARGET_DEFINITIONS TestInterfaces.td)
10 mlir_tablegen(TestAttrInterfaces.h.inc -gen-attr-interface-decls)
11 mlir_tablegen(TestAttrInterfaces.cpp.inc -gen-attr-interface-defs)
12 mlir_tablegen(TestTypeInterfaces.h.inc -gen-type-interface-decls)
13 mlir_tablegen(TestTypeInterfaces.cpp.inc -gen-type-interface-defs)
14 mlir_tablegen(TestOpInterfaces.h.inc -gen-op-interface-decls)
15 mlir_tablegen(TestOpInterfaces.cpp.inc -gen-op-interface-defs)
16 add_public_tablegen_target(MLIRTestInterfaceIncGen)
18 set(LLVM_TARGET_DEFINITIONS TestOps.td)
19 mlir_tablegen(TestAttrDefs.h.inc -gen-attrdef-decls -attrdefs-dialect=test)
20 mlir_tablegen(TestAttrDefs.cpp.inc -gen-attrdef-defs -attrdefs-dialect=test)
21 add_public_tablegen_target(MLIRTestAttrDefIncGen)
23 set(LLVM_TARGET_DEFINITIONS TestTypeDefs.td)
24 mlir_tablegen(TestTypeDefs.h.inc -gen-typedef-decls -typedefs-dialect=test)
25 mlir_tablegen(TestTypeDefs.cpp.inc -gen-typedef-defs -typedefs-dialect=test)
26 add_public_tablegen_target(MLIRTestTypeDefIncGen)
28 set(LLVM_TARGET_DEFINITIONS TestEnumDefs.td)
29 mlir_tablegen(TestOpEnums.h.inc -gen-enum-decls)
30 mlir_tablegen(TestOpEnums.cpp.inc -gen-enum-defs)
31 add_public_tablegen_target(MLIRTestEnumDefIncGen)
33 set(LLVM_TARGET_DEFINITIONS TestOps.td)
34 mlir_tablegen(TestOpsDialect.h.inc -gen-dialect-decls -dialect=test)
35 mlir_tablegen(TestOpsDialect.cpp.inc -gen-dialect-defs -dialect=test)
36 mlir_tablegen(TestPatterns.inc -gen-rewriters)
37 add_public_tablegen_target(MLIRTestOpsIncGen)
39 set(LLVM_TARGET_DEFINITIONS TestOpsSyntax.td)
40 mlir_tablegen(TestOpsSyntax.h.inc -gen-op-decls)
41 mlir_tablegen(TestOpsSyntax.cpp.inc -gen-op-defs)
42 add_public_tablegen_target(MLIRTestOpsSyntaxIncGen)
44 add_sharded_ops(TestOps 20)
46 # Exclude tests from libMLIR.so
47 add_mlir_library(MLIRTestDialect
48   TestAttributes.cpp
49   TestDialect.cpp
50   TestFormatUtils.cpp
51   TestInterfaces.cpp
52   TestOpDefs.cpp
53   TestOps.cpp
54   TestPatterns.cpp
55   TestTraits.cpp
56   TestTypes.cpp
57   TestOpsSyntax.cpp
58   TestDialectInterfaces.cpp
59   ${SHARDED_SRCS}
61   EXCLUDE_FROM_LIBMLIR
63   DEPENDS
64   MLIRTestAttrDefIncGen
65   MLIRTestEnumDefIncGen
66   MLIRTestInterfaceIncGen
67   MLIRTestTypeDefIncGen
68   MLIRTestOpsIncGen
69   MLIRTestOpsSyntaxIncGen
70   MLIRTestOpsShardGen
72   LINK_LIBS PUBLIC
73   MLIRControlFlowInterfaces
74   MLIRDataLayoutInterfaces
75   MLIRDerivedAttributeOpInterface
76   MLIRDestinationStyleOpInterface
77   MLIRDialect
78   MLIRDLTIDialect
79   MLIRFuncDialect
80   MLIRFunctionInterfaces
81   MLIRFuncTransforms
82   MLIRIR
83   MLIRInferIntRangeInterface
84   MLIRInferTypeOpInterface
85   MLIRLinalgDialect
86   MLIRLinalgTransforms
87   MLIRLLVMDialect
88   MLIRPass
89   MLIRPolynomialDialect
90   MLIRReduce
91   MLIRTensorDialect
92   MLIRTransformUtils
93   MLIRTransforms
94   MLIRValueBoundsOpInterface
97 add_mlir_translation_library(MLIRTestFromLLVMIRTranslation
98   TestFromLLVMIRTranslation.cpp
100   EXCLUDE_FROM_LIBMLIR
102   LINK_COMPONENTS
103   Core
105   LINK_LIBS PUBLIC
106   MLIRIR
107   MLIRLLVMDialect
108   MLIRTestDialect
109   MLIRSupport
110   MLIRTargetLLVMIRImport
111   MLIRLLVMIRToLLVMTranslation
114 add_mlir_translation_library(MLIRTestToLLVMIRTranslation
115   TestToLLVMIRTranslation.cpp
117   EXCLUDE_FROM_LIBMLIR
119   LINK_COMPONENTS
120   Core
122   LINK_LIBS PUBLIC
123   MLIRIR
124   MLIRLLVMDialect
125   MLIRTestDialect
126   MLIRSupport
127   MLIRBuiltinToLLVMIRTranslation
128   MLIRLLVMToLLVMIRTranslation