[Mlir-commits] [mlir] f7d4bd8 - [MLIR] Fix for out-of-tree builds from install area.

Stephen Neuendorffer llvmlistbot at llvm.org
Thu Mar 19 18:43:39 PDT 2020


Author: Stephen Neuendorffer
Date: 2020-03-19T18:43:19-07:00
New Revision: f7d4bd814439dc0e4c0a5ffe9bea5e304e17b681

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

LOG: [MLIR] Fix for out-of-tree builds from install area.

Because MLIR_HAS_EXPORTS is not set, MLIRTarget.cmake is not delivered
to the install area.  When this happens, the delivered MLIRConfig.cmake
should not reference it.   Independently, we need to determine under what
conditions MLIR_HAS_EXPORTS should be set.  Probably we are not exporting
all the libraries correctly.

Added: 
    

Modified: 
    mlir/cmake/modules/MLIRConfig.cmake.in

Removed: 
    


################################################################################
diff  --git a/mlir/cmake/modules/MLIRConfig.cmake.in b/mlir/cmake/modules/MLIRConfig.cmake.in
index 190aa193d1db..da518762919c 100644
--- a/mlir/cmake/modules/MLIRConfig.cmake.in
+++ b/mlir/cmake/modules/MLIRConfig.cmake.in
@@ -19,7 +19,9 @@ set_property(GLOBAL PROPERTY MLIR_DIALECT_LIBS "@MLIR_DIALECT_LIBS@")
 set_property(GLOBAL PROPERTY MLIR_CONVERSION_LIBS "@MLIR_CONVERSION_LIBS@")
 
 # Provide all our library targets to users.
-include("@MLIR_CONFIG_EXPORTS_FILE@")
+if(EXISTS @MLIR_CONFIG_EXPORTS_FILE@)
+  include("@MLIR_CONFIG_EXPORTS_FILE@")
+endif()
 
 # By creating these targets here, subprojects that depend on MLIR's
 # tablegen-generated headers can always depend on these targets whether building


        


More information about the Mlir-commits mailing list