[mlir] Unbreak building mlir-reduce

Unbreaks building mlir-reduce when `DLLVM_INCLUDE_TESTS` is set to OFF.
The dependency MLIRTestDialect is only available if building with tests.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D105434
This commit is contained in:
Marius Brehler 2021-07-05 15:01:12 +00:00
parent 7bc1baea6e
commit 96e3fb2416
1 changed files with 7 additions and 1 deletions

View File

@ -1,14 +1,20 @@
get_property(conversion_libs GLOBAL PROPERTY MLIR_CONVERSION_LIBS)
get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS)
if(MLIR_INCLUDE_TESTS)
set(test_libs
MLIRTestDialect
)
endif()
set(LIBS
${conversion_libs}
${dialect_libs}
${test_libs}
MLIRDialect
MLIRIR
MLIRPass
MLIRReduceLib
MLIRTestDialect
)
add_llvm_tool(mlir-reduce