2019-06-08 23:39:07 +08:00
|
|
|
set(LLVM_TARGET_DEFINITIONS enums.td)
|
|
|
|
mlir_tablegen(EnumsGenTest.h.inc -gen-enum-decls)
|
|
|
|
mlir_tablegen(EnumsGenTest.cpp.inc -gen-enum-defs)
|
|
|
|
add_public_tablegen_target(MLIRTableGenEnumsIncGen)
|
|
|
|
|
2019-08-31 03:51:31 +08:00
|
|
|
set(LLVM_TARGET_DEFINITIONS structs.td)
|
|
|
|
mlir_tablegen(StructAttrGenTest.h.inc -gen-struct-attr-decls)
|
|
|
|
mlir_tablegen(StructAttrGenTest.cpp.inc -gen-struct-attr-defs)
|
|
|
|
add_public_tablegen_target(MLIRTableGenStructAttrIncGen)
|
|
|
|
|
2021-06-15 23:09:31 +08:00
|
|
|
set(LLVM_TARGET_DEFINITIONS passes.td)
|
|
|
|
mlir_tablegen(PassGenTest.h.inc -gen-pass-decls -name TableGenTest)
|
|
|
|
add_public_tablegen_target(MLIRTableGenTestPassIncGen)
|
|
|
|
|
2019-04-12 20:57:50 +08:00
|
|
|
add_mlir_unittest(MLIRTableGenTests
|
2019-06-08 23:39:07 +08:00
|
|
|
EnumsGenTest.cpp
|
2019-08-31 05:09:46 +08:00
|
|
|
StructsGenTest.cpp
|
2019-04-12 20:57:50 +08:00
|
|
|
FormatTest.cpp
|
2020-07-29 01:29:43 +08:00
|
|
|
OpBuildGen.cpp
|
2021-06-15 23:09:31 +08:00
|
|
|
PassGenTest.cpp
|
2019-04-12 20:57:50 +08:00
|
|
|
)
|
2019-06-08 23:39:07 +08:00
|
|
|
|
|
|
|
add_dependencies(MLIRTableGenTests MLIRTableGenEnumsIncGen)
|
2019-08-31 03:51:31 +08:00
|
|
|
add_dependencies(MLIRTableGenTests MLIRTableGenStructAttrIncGen)
|
2021-06-15 23:09:31 +08:00
|
|
|
add_dependencies(MLIRTableGenTests MLIRTableGenTestPassIncGen)
|
2020-07-29 01:29:43 +08:00
|
|
|
add_dependencies(MLIRTableGenTests MLIRTestDialect)
|
|
|
|
|
2021-09-09 17:52:08 +08:00
|
|
|
target_include_directories(MLIRTableGenTests
|
|
|
|
PRIVATE
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../../test/lib/Dialect/Test
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/../../test/lib/Dialect/Test
|
|
|
|
)
|
2019-06-08 23:39:07 +08:00
|
|
|
|
2019-04-18 20:10:03 +08:00
|
|
|
target_link_libraries(MLIRTableGenTests
|
2020-07-29 01:29:43 +08:00
|
|
|
PRIVATE MLIRTableGen MLIRIR
|
|
|
|
PUBLIC MLIRTestDialect
|
|
|
|
)
|