[Mlir-commits] [mlir] 324ae45 - [mlir] Make mlir_check_link_libraries() work with interface libraries

Stephen Neuendorffer llvmlistbot at llvm.org
Fri Aug 14 11:39:30 PDT 2020


Author: Marius Brehler
Date: 2020-08-14T11:39:04-07:00
New Revision: 324ae458df7ed2b8fa55ddb93af5af17887347a3

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

LOG: [mlir] Make mlir_check_link_libraries() work with interface libraries

This changes mlir_check_link_libraries() to work with interface libraries.
These don't have the LINK_LIBRARIES property.

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

Added: 
    

Modified: 
    mlir/cmake/modules/AddMLIR.cmake

Removed: 
    


################################################################################
diff  --git a/mlir/cmake/modules/AddMLIR.cmake b/mlir/cmake/modules/AddMLIR.cmake
index e740b2d1cfcb..8394c056c1db 100644
--- a/mlir/cmake/modules/AddMLIR.cmake
+++ b/mlir/cmake/modules/AddMLIR.cmake
@@ -184,7 +184,12 @@ endfunction(add_mlir_translation_library)
 # Verification tools to aid debugging.
 function(mlir_check_link_libraries name)
   if(TARGET ${name})
-    get_target_property(libs ${name} LINK_LIBRARIES)
+    get_target_property(type ${name} TYPE)
+    if (${type} STREQUAL "INTERFACE_LIBRARY")
+      get_target_property(libs ${name} INTERFACE_LINK_LIBRARIES)
+    else()
+      get_target_property(libs ${name} LINK_LIBRARIES)
+    endif()
     # message("${name} libs are: ${libs}")
     set(linking_llvm 0)
     foreach(lib ${libs})


        


More information about the Mlir-commits mailing list