[Mlir-commits] [mlir] 950f689 - [mlir][cmake] export list of CAPI libs (#71722)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Nov 8 14:59:21 PST 2023
Author: Maksim Levental
Date: 2023-11-08T16:59:17-06:00
New Revision: 950f68991fbdf3921eeab732526984b01f8dd27e
URL: https://github.com/llvm/llvm-project/commit/950f68991fbdf3921eeab732526984b01f8dd27e
DIFF: https://github.com/llvm/llvm-project/commit/950f68991fbdf3921eeab732526984b01f8dd27e.diff
LOG: [mlir][cmake] export list of CAPI libs (#71722)
Added:
Modified:
mlir/cmake/modules/CMakeLists.txt
mlir/cmake/modules/MLIRConfig.cmake.in
mlir/lib/CAPI/CMakeLists.txt
Removed:
################################################################################
diff --git a/mlir/cmake/modules/CMakeLists.txt b/mlir/cmake/modules/CMakeLists.txt
index 017370bf01f9dda..8d2904ef46dfe81 100644
--- a/mlir/cmake/modules/CMakeLists.txt
+++ b/mlir/cmake/modules/CMakeLists.txt
@@ -26,6 +26,7 @@ get_property(MLIR_DIALECT_LIBS GLOBAL PROPERTY MLIR_DIALECT_LIBS)
get_property(MLIR_CONVERSION_LIBS GLOBAL PROPERTY MLIR_CONVERSION_LIBS)
get_property(MLIR_EXTENSION_LIBS GLOBAL PROPERTY MLIR_EXTENSION_LIBS)
get_property(MLIR_TRANSLATION_LIBS GLOBAL PROPERTY MLIR_TRANSLATION_LIBS)
+get_property(MLIR_CAPI_LIBS GLOBAL PROPERTY MLIR_CAPI_LIBS)
# Generate MlirConfig.cmake for the build tree.
set(MLIR_CONFIG_CMAKE_DIR "${mlir_cmake_builddir}")
diff --git a/mlir/cmake/modules/MLIRConfig.cmake.in b/mlir/cmake/modules/MLIRConfig.cmake.in
index d3324d55c848e05..cd8cec5dedf3c17 100644
--- a/mlir/cmake/modules/MLIRConfig.cmake.in
+++ b/mlir/cmake/modules/MLIRConfig.cmake.in
@@ -23,6 +23,7 @@ set_property(GLOBAL PROPERTY MLIR_DIALECT_LIBS "@MLIR_DIALECT_LIBS@")
set_property(GLOBAL PROPERTY MLIR_CONVERSION_LIBS "@MLIR_CONVERSION_LIBS@")
set_property(GLOBAL PROPERTY MLIR_EXTENSION_LIBS "@MLIR_EXTENSION_LIBS@")
set_property(GLOBAL PROPERTY MLIR_TRANSLATION_LIBS "@MLIR_TRANSLATION_LIBS@")
+set_property(GLOBAL PROPERTY MLIR_UPSTREAM_CAPI_LIBS "@MLIR_CAPI_LIBS@")
# Provide all our library targets to users.
# More specifically, configure MLIR so that it can be directly included in a top
diff --git a/mlir/lib/CAPI/CMakeLists.txt b/mlir/lib/CAPI/CMakeLists.txt
index 052eff327c73264..707e78ac3d1ea3c 100644
--- a/mlir/lib/CAPI/CMakeLists.txt
+++ b/mlir/lib/CAPI/CMakeLists.txt
@@ -1,10 +1,10 @@
-# For upstream, we accumulate all libraries into the MLIR_CAPI_LIBRARIES
+# For upstream, we accumulate all libraries into the MLIR_CAPI_LIBS
# property via a custom wrapper function. This is then used to create an
# aggregate below.
-set_property(GLOBAL APPEND PROPERTY MLIR_CAPI_LIBRARIES)
+set_property(GLOBAL APPEND PROPERTY MLIR_CAPI_LIBS)
function(add_mlir_upstream_c_api_library name)
add_mlir_public_c_api_library(${name} ${ARGN})
- set_property(GLOBAL APPEND PROPERTY MLIR_CAPI_LIBRARIES ${name})
+ set_property(GLOBAL APPEND PROPERTY MLIR_CAPI_LIBS ${name})
endfunction()
add_subdirectory(Debug)
@@ -22,7 +22,7 @@ endif()
# Build the optional CAPI dylib.
if(MLIR_BUILD_MLIR_C_DYLIB)
message(STATUS "Building MLIR-C dylib")
- get_property(_capi_libraries GLOBAL PROPERTY MLIR_CAPI_LIBRARIES)
+ get_property(_capi_libraries GLOBAL PROPERTY MLIR_CAPI_LIBS)
add_mlir_aggregate(MLIR-C
SHARED
EMBED_LIBS
More information about the Mlir-commits
mailing list