[Mlir-commits] [mlir] d675df0 - Revert "[MLIR] Move from add_dependencies() to DEPENDS"

Stephen Neuendorffer llvmlistbot at llvm.org
Sat Feb 29 11:52:48 PST 2020


Author: Stephen Neuendorffer
Date: 2020-02-29T11:52:08-08:00
New Revision: d675df03794816fdafc4f0d63391fa9ee0135921

URL: https://github.com/llvm/llvm-project/commit/d675df03794816fdafc4f0d63391fa9ee0135921
DIFF: https://github.com/llvm/llvm-project/commit/d675df03794816fdafc4f0d63391fa9ee0135921.diff

LOG: Revert "[MLIR] Move from add_dependencies() to DEPENDS"

This reverts commit 31e07d716a083b85df226c31f6ba72bc477f58fc.

Added: 
    

Modified: 
    mlir/examples/toy/Ch2/CMakeLists.txt
    mlir/examples/toy/Ch3/CMakeLists.txt
    mlir/examples/toy/Ch4/CMakeLists.txt
    mlir/examples/toy/Ch5/CMakeLists.txt
    mlir/examples/toy/Ch6/CMakeLists.txt
    mlir/examples/toy/Ch7/CMakeLists.txt
    mlir/lib/Analysis/CMakeLists.txt
    mlir/lib/Conversion/GPUToNVVM/CMakeLists.txt
    mlir/lib/Conversion/GPUToSPIRV/CMakeLists.txt
    mlir/lib/Conversion/StandardToSPIRV/CMakeLists.txt
    mlir/lib/Dialect/AffineOps/CMakeLists.txt
    mlir/lib/Dialect/FxpMathOps/CMakeLists.txt
    mlir/lib/Dialect/GPU/CMakeLists.txt
    mlir/lib/Dialect/LLVMIR/CMakeLists.txt
    mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
    mlir/lib/Dialect/LoopOps/CMakeLists.txt
    mlir/lib/Dialect/OpenMP/CMakeLists.txt
    mlir/lib/Dialect/QuantOps/CMakeLists.txt
    mlir/lib/Dialect/SPIRV/CMakeLists.txt
    mlir/lib/Dialect/SPIRV/Serialization/CMakeLists.txt
    mlir/lib/Dialect/StandardOps/CMakeLists.txt
    mlir/lib/Dialect/VectorOps/CMakeLists.txt
    mlir/lib/IR/CMakeLists.txt
    mlir/lib/Quantizer/CMakeLists.txt
    mlir/lib/Transforms/CMakeLists.txt
    mlir/lib/Transforms/Utils/CMakeLists.txt
    mlir/test/lib/TestDialect/CMakeLists.txt
    mlir/test/lib/Transforms/CMakeLists.txt
    mlir/tools/mlir-cuda-runner/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/mlir/examples/toy/Ch2/CMakeLists.txt b/mlir/examples/toy/Ch2/CMakeLists.txt
index ea03e4e4c13f..7154902017ee 100644
--- a/mlir/examples/toy/Ch2/CMakeLists.txt
+++ b/mlir/examples/toy/Ch2/CMakeLists.txt
@@ -9,13 +9,10 @@ add_toy_chapter(toyc-ch2
   parser/AST.cpp
   mlir/MLIRGen.cpp
   mlir/Dialect.cpp
-
-  DEPENDS
-  ToyCh2OpsIncGen
-
   )
 include_directories(include/)
 include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/)
+add_dependencies(toyc-ch2 ToyCh2OpsIncGen)
 target_link_libraries(toyc-ch2
   PRIVATE
     MLIRAnalysis

diff  --git a/mlir/examples/toy/Ch3/CMakeLists.txt b/mlir/examples/toy/Ch3/CMakeLists.txt
index e1bfe1bd12eb..823edfd343a3 100644
--- a/mlir/examples/toy/Ch3/CMakeLists.txt
+++ b/mlir/examples/toy/Ch3/CMakeLists.txt
@@ -14,12 +14,10 @@ add_toy_chapter(toyc-ch3
   mlir/MLIRGen.cpp
   mlir/Dialect.cpp
   mlir/ToyCombine.cpp
-
-  DEPENDS
-  ToyCh3OpsIncGen
-  ToyCh3CombineIncGen
   )
 
+add_dependencies(toyc-ch3 ToyCh3OpsIncGen)
+add_dependencies(toyc-ch3 ToyCh3CombineIncGen)
 include_directories(include/)
 include_directories(${CMAKE_CURRENT_BINARY_DIR})
 include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/)

diff  --git a/mlir/examples/toy/Ch4/CMakeLists.txt b/mlir/examples/toy/Ch4/CMakeLists.txt
index a78bedfd8814..c9b0e71e5291 100644
--- a/mlir/examples/toy/Ch4/CMakeLists.txt
+++ b/mlir/examples/toy/Ch4/CMakeLists.txt
@@ -15,14 +15,12 @@ add_toy_chapter(toyc-ch4
   mlir/Dialect.cpp
   mlir/ShapeInferencePass.cpp
   mlir/ToyCombine.cpp
-
-  DEPENDS
-  ToyCh4OpsIncGen
-  ToyCh4ShapeInferenceInterfaceIncGen
-  ToyCh4CombineIncGen
-  MLIRCallOpInterfacesIncGen
   )
 
+add_dependencies(toyc-ch4 ToyCh4OpsIncGen)
+add_dependencies(toyc-ch4 ToyCh4ShapeInferenceInterfaceIncGen)
+add_dependencies(toyc-ch4 ToyCh4CombineIncGen)
+add_dependencies(toyc-ch4 MLIRCallOpInterfacesIncGen)
 include_directories(include/)
 include_directories(${CMAKE_CURRENT_BINARY_DIR})
 include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/)

diff  --git a/mlir/examples/toy/Ch5/CMakeLists.txt b/mlir/examples/toy/Ch5/CMakeLists.txt
index 6b9ded359f66..4c2cf4978140 100644
--- a/mlir/examples/toy/Ch5/CMakeLists.txt
+++ b/mlir/examples/toy/Ch5/CMakeLists.txt
@@ -16,14 +16,12 @@ add_toy_chapter(toyc-ch5
   mlir/LowerToAffineLoops.cpp
   mlir/ShapeInferencePass.cpp
   mlir/ToyCombine.cpp
-
-  DEPENDS
-  ToyCh5ShapeInferenceInterfaceIncGen
-  ToyCh5OpsIncGen
-  ToyCh5CombineIncGen
-  MLIRCallOpInterfacesIncGen
   )
 
+add_dependencies(toyc-ch5 ToyCh5ShapeInferenceInterfaceIncGen)
+add_dependencies(toyc-ch5 ToyCh5OpsIncGen)
+add_dependencies(toyc-ch5 ToyCh5CombineIncGen)
+add_dependencies(toyc-ch5 MLIRCallOpInterfacesIncGen)
 include_directories(include/)
 include_directories(${CMAKE_CURRENT_BINARY_DIR})
 include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/)

diff  --git a/mlir/examples/toy/Ch6/CMakeLists.txt b/mlir/examples/toy/Ch6/CMakeLists.txt
index 767f2e31750b..d22ee0873b56 100644
--- a/mlir/examples/toy/Ch6/CMakeLists.txt
+++ b/mlir/examples/toy/Ch6/CMakeLists.txt
@@ -18,14 +18,12 @@ add_toy_chapter(toyc-ch6
   mlir/LowerToLLVM.cpp
   mlir/ShapeInferencePass.cpp
   mlir/ToyCombine.cpp
-
-  DEPENDS
-  ToyCh6ShapeInferenceInterfaceIncGen
-  ToyCh6OpsIncGen
-  ToyCh6CombineIncGen
-  MLIRCallOpInterfacesIncGen
   )
 
+add_dependencies(toyc-ch6 ToyCh6ShapeInferenceInterfaceIncGen)
+add_dependencies(toyc-ch6 ToyCh6OpsIncGen)
+add_dependencies(toyc-ch6 ToyCh6CombineIncGen)
+add_dependencies(toyc-ch6 MLIRCallOpInterfacesIncGen)
 include_directories(include/)
 include_directories(${CMAKE_CURRENT_BINARY_DIR})
 include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/)

diff  --git a/mlir/examples/toy/Ch7/CMakeLists.txt b/mlir/examples/toy/Ch7/CMakeLists.txt
index 2140678a3728..9f0790391366 100644
--- a/mlir/examples/toy/Ch7/CMakeLists.txt
+++ b/mlir/examples/toy/Ch7/CMakeLists.txt
@@ -18,14 +18,12 @@ add_toy_chapter(toyc-ch7
   mlir/LowerToLLVM.cpp
   mlir/ShapeInferencePass.cpp
   mlir/ToyCombine.cpp
-
-  DEPENDS
-  ToyCh7ShapeInferenceInterfaceIncGen
-  ToyCh7OpsIncGen
-  ToyCh7CombineIncGen
-  MLIRCallOpInterfacesIncGen
   )
 
+add_dependencies(toyc-ch7 ToyCh7ShapeInferenceInterfaceIncGen)
+add_dependencies(toyc-ch7 ToyCh7OpsIncGen)
+add_dependencies(toyc-ch7 ToyCh7CombineIncGen)
+add_dependencies(toyc-ch7 MLIRCallOpInterfacesIncGen)
 include_directories(include/)
 include_directories(${CMAKE_CURRENT_BINARY_DIR})
 include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/)

diff  --git a/mlir/lib/Analysis/CMakeLists.txt b/mlir/lib/Analysis/CMakeLists.txt
index 5df7fcecd37c..8c049882d711 100644
--- a/mlir/lib/Analysis/CMakeLists.txt
+++ b/mlir/lib/Analysis/CMakeLists.txt
@@ -23,10 +23,6 @@ add_llvm_library(MLIRAnalysis
   ADDITIONAL_HEADER_DIRS
   ${MLIR_MAIN_INCLUDE_DIR}/mlir/Analysis
 
-  DEPENDS
-  MLIRCallOpInterfacesIncGen
-  MLIRTypeInferOpInterfaceIncGen
-
   LINK_LIBS
   MLIRAffineOps
   MLIRIR
@@ -34,6 +30,10 @@ add_llvm_library(MLIRAnalysis
   MLIRSupport
   LLVMSupport
   )
+add_dependencies(MLIRAnalysis
+  MLIRCallOpInterfacesIncGen
+  MLIRTypeInferOpInterfaceIncGen
+  )
 
 add_llvm_library(MLIRLoopAnalysis
   AffineAnalysis.cpp
@@ -45,10 +45,6 @@ add_llvm_library(MLIRLoopAnalysis
   ADDITIONAL_HEADER_DIRS
   ${MLIR_MAIN_INCLUDE_DIR}/mlir/Analysis
 
-  DEPENDS
-  MLIRCallOpInterfacesIncGen
-  MLIRTypeInferOpInterfaceIncGen
-
   LINK_LIBS
   MLIRAffineOps
   MLIRIR
@@ -57,3 +53,7 @@ add_llvm_library(MLIRLoopAnalysis
   MLIRSupport
   LLVMSupport
   )
+add_dependencies(MLIRLoopAnalysis
+  MLIRCallOpInterfacesIncGen
+  MLIRTypeInferOpInterfaceIncGen
+  )

diff  --git a/mlir/lib/Conversion/GPUToNVVM/CMakeLists.txt b/mlir/lib/Conversion/GPUToNVVM/CMakeLists.txt
index 0f423d4f64bd..146c8a115cfe 100644
--- a/mlir/lib/Conversion/GPUToNVVM/CMakeLists.txt
+++ b/mlir/lib/Conversion/GPUToNVVM/CMakeLists.txt
@@ -5,9 +5,6 @@ add_public_tablegen_target(MLIRGPUToNVVMIncGen)
 add_mlir_conversion_library(MLIRGPUtoNVVMTransforms
   LowerGpuOpsToNVVMOps.cpp
 
-  DEPENDS
-  MLIRGPUToNVVMIncGen
-
   LINK_LIBS
   LLVMCore
   LLVMSupport
@@ -22,3 +19,6 @@ add_mlir_conversion_library(MLIRGPUtoNVVMTransforms
   MLIRTransforms
   MLIRTransformUtils
   )
+
+add_dependencies(MLIRGPUtoNVVMTransforms
+  MLIRGPUToNVVMIncGen)

diff  --git a/mlir/lib/Conversion/GPUToSPIRV/CMakeLists.txt b/mlir/lib/Conversion/GPUToSPIRV/CMakeLists.txt
index 279d5478c3e9..36f8ad2afe2e 100644
--- a/mlir/lib/Conversion/GPUToSPIRV/CMakeLists.txt
+++ b/mlir/lib/Conversion/GPUToSPIRV/CMakeLists.txt
@@ -6,9 +6,6 @@ add_mlir_conversion_library(MLIRGPUtoSPIRVTransforms
   ConvertGPUToSPIRV.cpp
   ConvertGPUToSPIRVPass.cpp
 
-  DEPENDS
-  MLIRGPUToSPIRVIncGen
-
   LINK_LIBS
   MLIRGPU
   MLIRIR
@@ -21,3 +18,6 @@ add_mlir_conversion_library(MLIRGPUtoSPIRVTransforms
   MLIRTransforms
   LLVMSupport
   )
+
+add_dependencies(MLIRGPUtoSPIRVTransforms
+  MLIRGPUToSPIRVIncGen)

diff  --git a/mlir/lib/Conversion/StandardToSPIRV/CMakeLists.txt b/mlir/lib/Conversion/StandardToSPIRV/CMakeLists.txt
index d5b5b9633c17..6ba6c31606d9 100644
--- a/mlir/lib/Conversion/StandardToSPIRV/CMakeLists.txt
+++ b/mlir/lib/Conversion/StandardToSPIRV/CMakeLists.txt
@@ -11,9 +11,6 @@ add_mlir_conversion_library(MLIRStandardToSPIRVTransforms
   ${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/SPIRV
   ${MLIR_MAIN_INCLUDE_DIR}/mlir/IR
 
-  DEPENDS
-  MLIRStandardToSPIRVIncGen
-
   LINK_LIBS
   MLIRIR
   MLIRPass
@@ -25,3 +22,6 @@ add_mlir_conversion_library(MLIRStandardToSPIRVTransforms
   MLIRStandardOps
   LLVMSupport
   )
+
+add_dependencies(MLIRStandardToSPIRVTransforms
+  MLIRStandardToSPIRVIncGen)

diff  --git a/mlir/lib/Dialect/AffineOps/CMakeLists.txt b/mlir/lib/Dialect/AffineOps/CMakeLists.txt
index c956b564177b..51017de16c1c 100644
--- a/mlir/lib/Dialect/AffineOps/CMakeLists.txt
+++ b/mlir/lib/Dialect/AffineOps/CMakeLists.txt
@@ -6,13 +6,13 @@ add_mlir_dialect_library(MLIRAffineOps
   ADDITIONAL_HEADER_DIRS
   ${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/AffineOps
 
-  DEPENDS
-  MLIRAffineOpsIncGen
-  MLIRLoopLikeInterfaceIncGen
-
   LINK_LIBS
   MLIREDSC
   MLIRIR
   MLIRStandardOps
   LLVMSupport
   )
+add_dependencies(MLIRAffineOps
+  MLIRAffineOpsIncGen
+  MLIRLoopLikeInterfaceIncGen
+  )

diff  --git a/mlir/lib/Dialect/FxpMathOps/CMakeLists.txt b/mlir/lib/Dialect/FxpMathOps/CMakeLists.txt
index 1e08882f3938..057290149a1b 100644
--- a/mlir/lib/Dialect/FxpMathOps/CMakeLists.txt
+++ b/mlir/lib/Dialect/FxpMathOps/CMakeLists.txt
@@ -5,9 +5,6 @@ add_mlir_dialect_library(MLIRFxpMathOps
   ADDITIONAL_HEADER_DIRS
   ${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/FxpMathOps
 
-  DEPENDS
-  MLIRFxpMathOpsIncGen
-
   LINK_LIBS
   MLIRQuantOps
   MLIRIR
@@ -18,3 +15,6 @@ add_mlir_dialect_library(MLIRFxpMathOps
   MLIRTransformUtils
   LLVMSupport
   )
+add_dependencies(MLIRFxpMathOps
+  MLIRFxpMathOpsIncGen
+  )

diff  --git a/mlir/lib/Dialect/GPU/CMakeLists.txt b/mlir/lib/Dialect/GPU/CMakeLists.txt
index dad3b37da03e..018291a7b7ae 100644
--- a/mlir/lib/Dialect/GPU/CMakeLists.txt
+++ b/mlir/lib/Dialect/GPU/CMakeLists.txt
@@ -8,9 +8,6 @@ add_mlir_dialect_library(MLIRGPU
   ADDITIONAL_HEADER_DIRS
   ${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/GPU
 
-  DEPENDS
-  MLIRGPUOpsIncGen
-
   LINK_LIBS
   MLIREDSC
   MLIRIR
@@ -22,3 +19,6 @@ add_mlir_dialect_library(MLIRGPU
   MLIRTransformUtils
   LLVMSupport
   )
+add_dependencies(MLIRGPU
+  MLIRGPUOpsIncGen
+  )

diff  --git a/mlir/lib/Dialect/LLVMIR/CMakeLists.txt b/mlir/lib/Dialect/LLVMIR/CMakeLists.txt
index 1583039e272e..71465c164eae 100644
--- a/mlir/lib/Dialect/LLVMIR/CMakeLists.txt
+++ b/mlir/lib/Dialect/LLVMIR/CMakeLists.txt
@@ -4,10 +4,6 @@ add_mlir_dialect_library(MLIRLLVMIR
   ADDITIONAL_HEADER_DIRS
   ${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/LLVMIR
 
-  DEPENDS
-  MLIRLLVMOpsIncGen
-  MLIRLLVMConversionsIncGen
-
   LINK_LIBS
   LLVMAsmParser
   LLVMCore
@@ -15,6 +11,10 @@ add_mlir_dialect_library(MLIRLLVMIR
   MLIRIR
   MLIRSupport
   )
+add_dependencies(MLIRLLVMIR
+  MLIRLLVMOpsIncGen
+  MLIRLLVMConversionsIncGen
+  )
 
 add_mlir_dialect_library(MLIRNVVMIR
   IR/NVVMDialect.cpp
@@ -22,10 +22,6 @@ add_mlir_dialect_library(MLIRNVVMIR
   ADDITIONAL_HEADER_DIRS
   ${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/LLVMIR
 
-  DEPENDS
-  MLIRNVVMOpsIncGen
-  MLIRNVVMConversionsIncGen
-
   LINK_LIBS
   LLVMAsmParser
   MLIRIR
@@ -33,6 +29,12 @@ add_mlir_dialect_library(MLIRNVVMIR
   LLVMSupport
   LLVMCore
   )
+add_dependencies(MLIRNVVMIR
+  MLIRNVVMOpsIncGen
+  MLIRNVVMConversionsIncGen
+  )
+
+
 
 add_mlir_dialect_library(MLIRROCDLIR
   IR/ROCDLDialect.cpp
@@ -40,13 +42,13 @@ add_mlir_dialect_library(MLIRROCDLIR
   ADDITIONAL_HEADER_DIRS
   ${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/LLVMIR
 
-  DEPENDS
-  MLIRROCDLOpsIncGen
-  MLIRROCDLConversionsIncGen
-
   LINK_LIBS
   LLVMAsmParser
   LLVMCore
   LLVMSupport
   MLIRIR
   )
+add_dependencies(MLIRROCDLIR
+  MLIRROCDLOpsIncGen
+  MLIRROCDLConversionsIncGen
+  )

diff  --git a/mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt b/mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
index 93290a02f174..7287324faa6b 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
+++ b/mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
@@ -7,10 +7,8 @@ add_mlir_dialect_library(MLIRLinalgTransforms
 
   ADDITIONAL_HEADER_DIRS
   ${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/Linalg
-
   DEPENDS
   intrinsics_gen
-  MLIRLinalgTransformPatternsIncGen
 
   LINK_LIBS
   MLIRAffineOps
@@ -29,3 +27,6 @@ add_mlir_dialect_library(MLIRLinalgTransforms
   MLIRVectorOps
   LLVMSupport
   )
+add_dependencies(MLIRLinalgTransforms
+  MLIRLinalgTransformPatternsIncGen
+  )

diff  --git a/mlir/lib/Dialect/LoopOps/CMakeLists.txt b/mlir/lib/Dialect/LoopOps/CMakeLists.txt
index e5633cfd9f21..635bbdeb58a6 100644
--- a/mlir/lib/Dialect/LoopOps/CMakeLists.txt
+++ b/mlir/lib/Dialect/LoopOps/CMakeLists.txt
@@ -6,15 +6,15 @@ add_mlir_dialect_library(MLIRLoopOps
   ADDITIONAL_HEADER_DIRS
   ${MLIR_MAIN_INCLUDE_DIR}/mlir/LoopOps
 
-  DEPENDS
-  MLIRLoopLikeInterfaceIncGen
-  MLIRLoopOpsIncGen
-
   LINK_LIBS
   MLIREDSC
   MLIRIR
   MLIRStandardOps
   LLVMSupport
   )
+add_dependencies(MLIRLoopOps
+  MLIRLoopLikeInterfaceIncGen
+  MLIRLoopOpsIncGen
+  )
 
 add_subdirectory(Transforms)

diff  --git a/mlir/lib/Dialect/OpenMP/CMakeLists.txt b/mlir/lib/Dialect/OpenMP/CMakeLists.txt
index a7ac7ac1bc54..8e00e473af20 100644
--- a/mlir/lib/Dialect/OpenMP/CMakeLists.txt
+++ b/mlir/lib/Dialect/OpenMP/CMakeLists.txt
@@ -4,11 +4,10 @@ add_mlir_dialect_library(MLIROpenMP
   ADDITIONAL_HEADER_DIRS
   ${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/OpenMP
 
-  DEPENDS
-  MLIROpenMPOpsIncGen
-
   LINK_LIBS
   MLIRIR
   LLVMCore
   LLVMSupport
   )
+
+add_dependencies(MLIROpenMP MLIROpenMPOpsIncGen)

diff  --git a/mlir/lib/Dialect/QuantOps/CMakeLists.txt b/mlir/lib/Dialect/QuantOps/CMakeLists.txt
index 5606612375ee..c9d104114465 100644
--- a/mlir/lib/Dialect/QuantOps/CMakeLists.txt
+++ b/mlir/lib/Dialect/QuantOps/CMakeLists.txt
@@ -12,9 +12,6 @@ add_mlir_dialect_library(MLIRQuantOps
   ADDITIONAL_HEADER_DIRS
   ${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/QuantOps
 
-  DEPENDS
-  MLIRQuantOpsIncGen
-
   LINK_LIBS
   MLIRIR
   MLIRPass
@@ -23,3 +20,6 @@ add_mlir_dialect_library(MLIRQuantOps
   MLIRTransformUtils
   LLVMSupport
   )
+add_dependencies(MLIRQuantOps
+  MLIRQuantOpsIncGen
+  )

diff  --git a/mlir/lib/Dialect/SPIRV/CMakeLists.txt b/mlir/lib/Dialect/SPIRV/CMakeLists.txt
index 5f755e359a96..ba67e745b13e 100644
--- a/mlir/lib/Dialect/SPIRV/CMakeLists.txt
+++ b/mlir/lib/Dialect/SPIRV/CMakeLists.txt
@@ -14,15 +14,6 @@ add_mlir_dialect_library(MLIRSPIRV
   ADDITIONAL_HEADER_DIRS
   ${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/SPIRV
 
-  DEPENDS
-  MLIRSPIRVAvailabilityIncGen
-  MLIRSPIRVCanonicalizationIncGen
-  MLIRSPIRVEnumAvailabilityIncGen
-  MLIRSPIRVEnumsIncGen
-  MLIRSPIRVOpsIncGen
-  MLIRSPIRVOpUtilsGen
-  MLIRSPIRVTargetAndABIIncGen
-
   LINK_LIBS
   MLIRIR
   MLIRParser
@@ -32,5 +23,15 @@ add_mlir_dialect_library(MLIRSPIRV
   LLVMSupport
   )
 
+add_dependencies(MLIRSPIRV
+  MLIRSPIRVAvailabilityIncGen
+  MLIRSPIRVCanonicalizationIncGen
+  MLIRSPIRVEnumAvailabilityIncGen
+  MLIRSPIRVEnumsIncGen
+  MLIRSPIRVOpsIncGen
+  MLIRSPIRVOpUtilsGen
+  MLIRSPIRVTargetAndABIIncGen)
+
+
 add_subdirectory(Serialization)
 add_subdirectory(Transforms)

diff  --git a/mlir/lib/Dialect/SPIRV/Serialization/CMakeLists.txt b/mlir/lib/Dialect/SPIRV/Serialization/CMakeLists.txt
index ef44e986a50a..543e1b430ecb 100644
--- a/mlir/lib/Dialect/SPIRV/Serialization/CMakeLists.txt
+++ b/mlir/lib/Dialect/SPIRV/Serialization/CMakeLists.txt
@@ -7,9 +7,6 @@ add_mlir_dialect_library(MLIRSPIRVSerialization
   ADDITIONAL_HEADER_DIRS
   ${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/SPIRV
 
-  DEPENDS
-  MLIRSPIRVSerializationGen
-
   LINK_LIBS
   MLIRIR
   MLIRParser
@@ -18,3 +15,6 @@ add_mlir_dialect_library(MLIRSPIRVSerialization
   MLIRTranslation
   LLVMSupport
   )
+
+add_dependencies(MLIRSPIRVSerialization
+  MLIRSPIRVSerializationGen)

diff  --git a/mlir/lib/Dialect/StandardOps/CMakeLists.txt b/mlir/lib/Dialect/StandardOps/CMakeLists.txt
index 4831441119e0..acf47df6eb8d 100644
--- a/mlir/lib/Dialect/StandardOps/CMakeLists.txt
+++ b/mlir/lib/Dialect/StandardOps/CMakeLists.txt
@@ -6,10 +6,6 @@ add_mlir_dialect_library(MLIRStandardOps
   ADDITIONAL_HEADER_DIRS
   ${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/StandardOps
 
-  DEPENDS
-  MLIRCallOpInterfacesIncGen
-  MLIRStandardOpsIncGen
-
   LINK_LIBS
   MLIREDSC
   MLIRIR
@@ -17,3 +13,7 @@ add_mlir_dialect_library(MLIRStandardOps
   LLVMCore
   LLVMSupport
   )
+add_dependencies(MLIRStandardOps
+  MLIRCallOpInterfacesIncGen
+  MLIRStandardOpsIncGen
+  )

diff  --git a/mlir/lib/Dialect/VectorOps/CMakeLists.txt b/mlir/lib/Dialect/VectorOps/CMakeLists.txt
index 86910d0c3a6c..ff97a95b0c8b 100644
--- a/mlir/lib/Dialect/VectorOps/CMakeLists.txt
+++ b/mlir/lib/Dialect/VectorOps/CMakeLists.txt
@@ -7,10 +7,6 @@ add_mlir_dialect_library(MLIRVectorOps
   ADDITIONAL_HEADER_DIRS
   ${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/VectorOps
 
-  DEPENDS
-  MLIRVectorOpsIncGen
-  MLIRVectorTransformPatternsIncGen
-
   LINK_LIBS
   MLIRIR
   MLIRStandardOps
@@ -19,3 +15,6 @@ add_mlir_dialect_library(MLIRVectorOps
   MLIRLoopAnalysis
   LLVMSupport
   )
+
+add_dependencies(MLIRVectorOps MLIRVectorOpsIncGen)
+add_dependencies(MLIRVectorOps MLIRVectorTransformPatternsIncGen)

diff  --git a/mlir/lib/IR/CMakeLists.txt b/mlir/lib/IR/CMakeLists.txt
index 80a9e4f12b9b..f3788e2ca0ab 100644
--- a/mlir/lib/IR/CMakeLists.txt
+++ b/mlir/lib/IR/CMakeLists.txt
@@ -5,12 +5,12 @@ add_llvm_library(MLIRIR
   ADDITIONAL_HEADER_DIRS
   ${MLIR_MAIN_INCLUDE_DIR}/mlir/IR
 
-  DEPENDS
-  MLIRCallOpInterfacesIncGen
-  MLIROpAsmInterfacesIncGen
-
   LINK_LIBS
   MLIRSupport
   LLVMSupport
   ${LLVM_PTHREAD_LIB}
   )
+add_dependencies(MLIRIR
+  MLIRCallOpInterfacesIncGen
+  MLIROpAsmInterfacesIncGen
+  )

diff  --git a/mlir/lib/Quantizer/CMakeLists.txt b/mlir/lib/Quantizer/CMakeLists.txt
index 5b52b2a9a170..34d0effc9362 100644
--- a/mlir/lib/Quantizer/CMakeLists.txt
+++ b/mlir/lib/Quantizer/CMakeLists.txt
@@ -24,9 +24,6 @@ add_llvm_library(MLIRQuantizerFxpMathConfig
 
   ADDITIONAL_HEADER_DIRS
 
-  DEPENDS
-  MLIRFxpMathOpsIncGen
-
   LINK_LIBS
   MLIRIR
   MLIRFxpMathOps
@@ -37,6 +34,10 @@ add_llvm_library(MLIRQuantizerFxpMathConfig
   LLVMSupport
   )
 
+add_dependencies(MLIRQuantizerFxpMathConfig
+  MLIRFxpMathOpsIncGen
+  )
+
 # Transforms.
 add_llvm_library(MLIRQuantizerTransforms
   Transforms/AddDefaultStatsTestPass.cpp

diff  --git a/mlir/lib/Transforms/CMakeLists.txt b/mlir/lib/Transforms/CMakeLists.txt
index 980a357ed751..7a98490904bd 100644
--- a/mlir/lib/Transforms/CMakeLists.txt
+++ b/mlir/lib/Transforms/CMakeLists.txt
@@ -27,10 +27,6 @@ add_llvm_library(MLIRTransforms
   ADDITIONAL_HEADER_DIRS
   ${MLIR_MAIN_INCLUDE_DIR}/mlir/Transforms
 
-  DEPENDS
-  MLIRLoopLikeInterfaceIncGen
-  MLIRStandardOpsIncGen
-
   LINK_LIBS
   MLIRAffineOps
   MLIRAnalysis
@@ -44,3 +40,7 @@ add_llvm_library(MLIRTransforms
   MLIRVectorOps
   LLVMSupport
   )
+
+add_dependencies(MLIRTransforms
+  MLIRLoopLikeInterfaceIncGen
+  MLIRStandardOpsIncGen)

diff  --git a/mlir/lib/Transforms/Utils/CMakeLists.txt b/mlir/lib/Transforms/Utils/CMakeLists.txt
index de3351133165..d826a6bde6fc 100644
--- a/mlir/lib/Transforms/Utils/CMakeLists.txt
+++ b/mlir/lib/Transforms/Utils/CMakeLists.txt
@@ -10,9 +10,6 @@ add_llvm_library(MLIRTransformUtils
   ADDITIONAL_HEADER_DIRS
   ${MLIR_MAIN_INCLUDE_DIR}/mlir/Transforms
 
-  DEPENDS
-  MLIRStandardOpsIncGen
-
   LINK_LIBS
   MLIRAffineOps
   MLIRAnalysis
@@ -23,3 +20,4 @@ add_llvm_library(MLIRTransformUtils
   MLIRStandardOps
   LLVMSupport
   )
+add_dependencies(MLIRTransformUtils MLIRStandardOpsIncGen)

diff  --git a/mlir/test/lib/TestDialect/CMakeLists.txt b/mlir/test/lib/TestDialect/CMakeLists.txt
index d79d48128661..d35caae2e5bb 100644
--- a/mlir/test/lib/TestDialect/CMakeLists.txt
+++ b/mlir/test/lib/TestDialect/CMakeLists.txt
@@ -15,10 +15,6 @@ add_llvm_library(MLIRTestDialect
   TestDialect.cpp
   TestPatterns.cpp
 
-  DEPENDS
-  MLIRTestOpsIncGen
-  MLIRTypeInferOpInterfaceIncGen
-
   LINK_LIBS
   MLIRAnalysis
   MLIRDialect
@@ -29,3 +25,7 @@ add_llvm_library(MLIRTestDialect
   MLIRTransformUtils
   LLVMSupport
 )
+add_dependencies(MLIRTestDialect
+  MLIRTestOpsIncGen
+  MLIRTypeInferOpInterfaceIncGen
+)

diff  --git a/mlir/test/lib/Transforms/CMakeLists.txt b/mlir/test/lib/Transforms/CMakeLists.txt
index 8b898d5472eb..867a7b7c72cb 100644
--- a/mlir/test/lib/Transforms/CMakeLists.txt
+++ b/mlir/test/lib/Transforms/CMakeLists.txt
@@ -23,11 +23,6 @@ add_llvm_library(MLIRTestTransforms
   ADDITIONAL_HEADER_DIRS
   ${MLIR_MAIN_INCLUDE_DIR}/mlir/Transforms
 
-  DEPENDS
-  MLIRStandardOpsIncGen
-  MLIRTestLinalgTransformPatternsIncGen
-  MLIRTestVectorTransformPatternsIncGen
-
   LINK_LIBS
   MLIRAffineOps
   MLIRAnalysis
@@ -52,3 +47,6 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../TestDialect)
 include_directories(${CMAKE_CURRENT_BINARY_DIR}/../TestDialect)
 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../DeclarativeTransforms)
 include_directories(${CMAKE_CURRENT_BINARY_DIR}/../DeclarativeTransforms)
+add_dependencies(MLIRTestTransforms MLIRStandardOpsIncGen)
+add_dependencies(MLIRTestTransforms MLIRTestLinalgTransformPatternsIncGen)
+add_dependencies(MLIRTestTransforms MLIRTestVectorTransformPatternsIncGen)

diff  --git a/mlir/tools/mlir-cuda-runner/CMakeLists.txt b/mlir/tools/mlir-cuda-runner/CMakeLists.txt
index 63a2dc822440..babe13dd128d 100644
--- a/mlir/tools/mlir-cuda-runner/CMakeLists.txt
+++ b/mlir/tools/mlir-cuda-runner/CMakeLists.txt
@@ -68,10 +68,8 @@ if(MLIR_CUDA_RUNNER_ENABLED)
 
   add_llvm_tool(mlir-cuda-runner
     mlir-cuda-runner.cpp
-
-    DEPENDS
-    cuda-runtime-wrappers
-    )
+  )
+  add_dependencies(mlir-cuda-runner cuda-runtime-wrappers)
   target_include_directories(mlir-cuda-runner
     PRIVATE ${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES}
   )


        


More information about the Mlir-commits mailing list