[Mlir-commits] [mlir] 314f00a - [MLIR][cmake] Remove redundant add_dependencies()
Stephen Neuendorffer
llvmlistbot at llvm.org
Thu Apr 16 14:42:24 PDT 2020
Author: Stephen Neuendorffer
Date: 2020-04-16T14:41:54-07:00
New Revision: 314f00a03489c84b764de2a6f4401996865ff281
URL: https://github.com/llvm/llvm-project/commit/314f00a03489c84b764de2a6f4401996865ff281
DIFF: https://github.com/llvm/llvm-project/commit/314f00a03489c84b764de2a6f4401996865ff281.diff
LOG: [MLIR][cmake] Remove redundant add_dependencies()
Libraries declared as target_link_libraries() do not also need
to be declared as dependencies using add_dependencies().
Differential Revision: https://reviews.llvm.org/D78320
Added:
Modified:
mlir/lib/Conversion/AVX512ToLLVM/CMakeLists.txt
mlir/lib/Conversion/LinalgToLLVM/CMakeLists.txt
mlir/lib/Conversion/VectorToLLVM/CMakeLists.txt
mlir/lib/Conversion/VectorToLoops/CMakeLists.txt
mlir/lib/EDSC/CMakeLists.txt
Removed:
################################################################################
diff --git a/mlir/lib/Conversion/AVX512ToLLVM/CMakeLists.txt b/mlir/lib/Conversion/AVX512ToLLVM/CMakeLists.txt
index 9df0d4fde7f1..11397b9e105e 100644
--- a/mlir/lib/Conversion/AVX512ToLLVM/CMakeLists.txt
+++ b/mlir/lib/Conversion/AVX512ToLLVM/CMakeLists.txt
@@ -8,7 +8,8 @@ add_mlir_conversion_library(MLIRAVX512ToLLVM
MLIRConversionPassIncGen
)
-set(LIBS
+target_link_libraries(MLIRAVX512ToLLVM
+ PUBLIC
MLIRAVX512
MLIRLLVMAVX512
MLIRLLVMIR
@@ -17,6 +18,3 @@ set(LIBS
LLVMCore
LLVMSupport
)
-
-add_dependencies(MLIRAVX512ToLLVM ${LIBS})
-target_link_libraries(MLIRAVX512ToLLVM PUBLIC ${LIBS})
diff --git a/mlir/lib/Conversion/LinalgToLLVM/CMakeLists.txt b/mlir/lib/Conversion/LinalgToLLVM/CMakeLists.txt
index 72e0966f447b..8519566e4fb2 100644
--- a/mlir/lib/Conversion/LinalgToLLVM/CMakeLists.txt
+++ b/mlir/lib/Conversion/LinalgToLLVM/CMakeLists.txt
@@ -7,7 +7,9 @@ add_mlir_conversion_library(MLIRLinalgToLLVM
DEPENDS
MLIRConversionPassIncGen
)
-set(LIBS
+
+target_link_libraries(MLIRLinalgToLLVM
+ PUBLIC
MLIRAffineToStandard
MLIREDSC
MLIRIR
@@ -20,8 +22,3 @@ set(LIBS
LLVMCore
LLVMSupport
)
-
-add_dependencies(MLIRLinalgToLLVM ${LIBS})
-target_link_libraries(MLIRLinalgToLLVM
- PUBLIC
- ${LIBS})
diff --git a/mlir/lib/Conversion/VectorToLLVM/CMakeLists.txt b/mlir/lib/Conversion/VectorToLLVM/CMakeLists.txt
index ffc6da95da7e..6d6b3b87c073 100644
--- a/mlir/lib/Conversion/VectorToLLVM/CMakeLists.txt
+++ b/mlir/lib/Conversion/VectorToLLVM/CMakeLists.txt
@@ -7,7 +7,9 @@ add_mlir_conversion_library(MLIRVectorToLLVM
DEPENDS
MLIRConversionPassIncGen
)
-set(LIBS
+
+target_link_libraries(MLIRVectorToLLVM
+ PUBLIC
MLIRLLVMIR
MLIRStandardToLLVM
MLIRVector
@@ -15,8 +17,3 @@ set(LIBS
LLVMCore
LLVMSupport
)
-
-add_dependencies(MLIRVectorToLLVM ${LIBS})
-target_link_libraries(MLIRVectorToLLVM
- PUBLIC
- ${LIBS})
diff --git a/mlir/lib/Conversion/VectorToLoops/CMakeLists.txt b/mlir/lib/Conversion/VectorToLoops/CMakeLists.txt
index 41414fc9bea7..515c0e2d0344 100644
--- a/mlir/lib/Conversion/VectorToLoops/CMakeLists.txt
+++ b/mlir/lib/Conversion/VectorToLoops/CMakeLists.txt
@@ -4,7 +4,9 @@ add_mlir_conversion_library(MLIRVectorToLoops
ADDITIONAL_HEADER_DIRS
${MLIR_MAIN_INCLUDE_DIR}/mlir/Conversion/VectorToLoops
)
-set(LIBS
+
+target_link_libraries(MLIRVectorToLoops
+ PUBLIC
MLIREDSC
MLIRAffineEDSC
MLIRLLVMIR
@@ -12,8 +14,3 @@ set(LIBS
LLVMCore
LLVMSupport
)
-
-add_dependencies(MLIRVectorToLoops ${LIBS})
-target_link_libraries(MLIRVectorToLoops
- PUBLIC
- ${LIBS})
diff --git a/mlir/lib/EDSC/CMakeLists.txt b/mlir/lib/EDSC/CMakeLists.txt
index 791ef0de6458..1435dbb22926 100644
--- a/mlir/lib/EDSC/CMakeLists.txt
+++ b/mlir/lib/EDSC/CMakeLists.txt
@@ -22,7 +22,6 @@ add_mlir_library(MLIREDSCInterface
ADDITIONAL_HEADER_DIRS
${MLIR_MAIN_INCLUDE_DIR}/mlir/EDSC
)
-add_dependencies(MLIREDSCInterface MLIRIR)
target_link_libraries(MLIREDSCInterface
PUBLIC
MLIRIR
More information about the Mlir-commits
mailing list