[Mlir-commits] [mlir] e782471 - Fixed CMakeLists.txt to export mlir/include/mlir/Dialenct/SparseTensor/IR/Enums.h correctly for installing MLIRSparseTensorEnums as a library in other projects using MLIR

Murali Vijayaraghavan llvmlistbot at llvm.org
Fri Oct 21 14:48:40 PDT 2022


Author: Murali Vijayaraghavan
Date: 2022-10-21T21:47:02Z
New Revision: e78247112ac2599bd682e16429bfceada4ac803d

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

LOG: Fixed CMakeLists.txt to export mlir/include/mlir/Dialenct/SparseTensor/IR/Enums.h correctly for installing MLIRSparseTensorEnums as a library in other projects using MLIR

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

Added: 
    

Modified: 
    mlir/lib/Dialect/SparseTensor/IR/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/SparseTensor/IR/CMakeLists.txt b/mlir/lib/Dialect/SparseTensor/IR/CMakeLists.txt
index 019b5d046756b..feb227390a9d0 100644
--- a/mlir/lib/Dialect/SparseTensor/IR/CMakeLists.txt
+++ b/mlir/lib/Dialect/SparseTensor/IR/CMakeLists.txt
@@ -17,7 +17,9 @@ endif()
 # Older versions of cmake (< 3.19) require INTERFACE libraries to separate
 # the `add_library` and `target_sources` calls.
 add_library(MLIRSparseTensorEnums INTERFACE)
-target_sources(MLIRSparseTensorEnums INTERFACE ${MLIRSparseTensorEnums_srcs})
+target_sources(MLIRSparseTensorEnums INTERFACE
+	$<BUILD_INTERFACE:${MLIRSparseTensorEnums_srcs}>
+	$<INSTALL_INTERFACE:mlir/Dialect/SparseTensor/IR/Enums.h>)
 # The `add_mlir_library_install` is required for other libraries to
 # depend on this one, but the conditional itself and the phony target
 # are copypasta from `add_mlir_library`.  Afaict (wrengr), the version


        


More information about the Mlir-commits mailing list