From: Marius Brehler Date: Mon, 5 Jul 2021 15:01:12 +0000 (+0000) Subject: [mlir] Unbreak building mlir-reduce X-Git-Tag: llvmorg-14-init~2256 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=96e3fb2416f6ce9bae94313b30bdfeeaddb2de36;p=platform%2Fupstream%2Fllvm.git [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 --- diff --git a/mlir/tools/mlir-reduce/CMakeLists.txt b/mlir/tools/mlir-reduce/CMakeLists.txt index 63ccb94..8893316 100644 --- a/mlir/tools/mlir-reduce/CMakeLists.txt +++ b/mlir/tools/mlir-reduce/CMakeLists.txt @@ -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