[Mlir-commits] [mlir] 26805f0 - [MLIR][cmake] Use DEPENDS instead of add_dependencies()

Stephen Neuendorffer llvmlistbot at llvm.org
Thu Apr 16 15:55:28 PDT 2020


Author: Stephen Neuendorffer
Date: 2020-04-16T15:53:13-07:00
New Revision: 26805f0b6408eeb30b83d37ec266f27288f1113a

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

LOG: [MLIR][cmake] Use DEPENDS instead of add_dependencies()

add_llvm_library() sometimes needs access to the dependencies in order to
generate new targets.  Using DEPENDS allows this.

Differential Revision: https://reviews.llvm.org/D78321

Added: 
    

Modified: 
    mlir/lib/Interfaces/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Interfaces/CMakeLists.txt b/mlir/lib/Interfaces/CMakeLists.txt
index a6e053d7674e..fdd36bb3e1fa 100644
--- a/mlir/lib/Interfaces/CMakeLists.txt
+++ b/mlir/lib/Interfaces/CMakeLists.txt
@@ -12,8 +12,8 @@ add_mlir_library(MLIRCallInterfaces
 
   ADDITIONAL_HEADER_DIRS
   ${MLIR_MAIN_INCLUDE_DIR}/mlir/Interfaces
-  )
-add_dependencies(MLIRCallInterfaces
+
+  DEPENDS
   MLIRCallInterfacesIncGen
   )
 target_link_libraries(MLIRCallInterfaces
@@ -26,8 +26,8 @@ add_mlir_library(MLIRControlFlowInterfaces
 
   ADDITIONAL_HEADER_DIRS
   ${MLIR_MAIN_INCLUDE_DIR}/mlir/Interfaces
-  )
-add_dependencies(MLIRControlFlowInterfaces
+
+  DEPENDS
   MLIRControlFlowInterfacesIncGen
   )
 target_link_libraries(MLIRControlFlowInterfaces
@@ -40,8 +40,8 @@ add_mlir_library(MLIRDerivedAttributeOpInterface
 
   ADDITIONAL_HEADER_DIRS
   ${MLIR_MAIN_INCLUDE_DIR}/mlir/Interfaces
-  )
-add_dependencies(MLIRDerivedAttributeOpInterface
+
+  DEPENDS
   MLIRDerivedAttributeOpInterfaceIncGen
   )
 target_link_libraries(MLIRDerivedAttributeOpInterface
@@ -54,8 +54,8 @@ add_mlir_library(MLIRInferTypeOpInterface
 
   ADDITIONAL_HEADER_DIRS
   ${MLIR_MAIN_INCLUDE_DIR}/mlir/Interfaces
-  )
-add_dependencies(MLIRInferTypeOpInterface
+
+  DEPENDS
   MLIRInferTypeOpInterfaceIncGen
   )
 target_link_libraries(MLIRInferTypeOpInterface
@@ -68,8 +68,8 @@ add_mlir_library(MLIRLoopLikeInterface
 
   ADDITIONAL_HEADER_DIRS
   ${MLIR_MAIN_INCLUDE_DIR}/mlir/Interfaces
-  )
-add_dependencies(MLIRLoopLikeInterface
+
+  DEPENDS
   MLIRLoopLikeInterfaceIncGen
   )
 target_link_libraries(MLIRLoopLikeInterface
@@ -82,8 +82,8 @@ add_mlir_library(MLIRSideEffects
 
   ADDITIONAL_HEADER_DIRS
   ${MLIR_MAIN_INCLUDE_DIR}/mlir/Interfaces
-  )
-add_dependencies(MLIRSideEffects
+
+  DEPENDS
   MLIRSideEffectOpInterfacesIncGen
   )
 target_link_libraries(MLIRSideEffects


        


More information about the Mlir-commits mailing list