Skip to content

Commit 96e3fb2

Browse files
committed
[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
1 parent 7bc1bae commit 96e3fb2

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

mlir/tools/mlir-reduce/CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
get_property(conversion_libs GLOBAL PROPERTY MLIR_CONVERSION_LIBS)
22
get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS)
33

4+
if(MLIR_INCLUDE_TESTS)
5+
set(test_libs
6+
MLIRTestDialect
7+
)
8+
endif()
9+
410
set(LIBS
511
${conversion_libs}
612
${dialect_libs}
13+
${test_libs}
714
MLIRDialect
815
MLIRIR
916
MLIRPass
1017
MLIRReduceLib
11-
MLIRTestDialect
1218
)
1319

1420
add_llvm_tool(mlir-reduce

0 commit comments

Comments
 (0)