From 7a17f3ccd109998d4e7019f5239dda61d7c6f829 Mon Sep 17 00:00:00 2001 From: Stephen Neuendorffer Date: Tue, 12 May 2020 13:37:31 -0700 Subject: [PATCH] [MLIR] Fix dependencies for Analysis libraries cmake does not truly support dependencies on automatically generated files which are not in the same directory as the targets which depend on them. It works with ninja, but doesn't work with make This patch adds an explicit dependence so that all dialects are built before the analysis libraries. Differential Revision: https://reviews.llvm.org/D79805 --- mlir/lib/Analysis/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mlir/lib/Analysis/CMakeLists.txt b/mlir/lib/Analysis/CMakeLists.txt index a008bcd02468..0d9cc9036c2f 100644 --- a/mlir/lib/Analysis/CMakeLists.txt +++ b/mlir/lib/Analysis/CMakeLists.txt @@ -17,6 +17,9 @@ add_mlir_library(MLIRAnalysis ADDITIONAL_HEADER_DIRS ${MLIR_MAIN_INCLUDE_DIR}/mlir/Analysis + DEPENDS + mlir-headers + LINK_LIBS PUBLIC MLIRAffineOps MLIRCallInterfaces @@ -35,6 +38,9 @@ add_mlir_library(MLIRLoopAnalysis ADDITIONAL_HEADER_DIRS ${MLIR_MAIN_INCLUDE_DIR}/mlir/Analysis + DEPENDS + mlir-headers + LINK_LIBS PUBLIC MLIRAffineOps MLIRCallInterfaces