[Mlir-commits] [mlir] [mlir][python][cmake] add EXTRA_INCLUDES to `declare_mlir_dialect_python_bindings` (PR #76204)
Maksim Levental
llvmlistbot at llvm.org
Thu Dec 21 21:07:38 PST 2023
https://github.com/makslevental updated https://github.com/llvm/llvm-project/pull/76204
>From 28d1c7df9f028ce73eb41e477b58a82a668d725d Mon Sep 17 00:00:00 2001
From: max <maksim.levental at gmail.com>
Date: Thu, 21 Dec 2023 23:03:00 -0600
Subject: [PATCH] [mlir][python][cmake] add EXTRA_INCLUDES to
declare_mlir_dialect_python_bindings
---
mlir/cmake/modules/AddMLIRPython.cmake | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/mlir/cmake/modules/AddMLIRPython.cmake b/mlir/cmake/modules/AddMLIRPython.cmake
index 012380603a4c45..052dbff3b4d14a 100644
--- a/mlir/cmake/modules/AddMLIRPython.cmake
+++ b/mlir/cmake/modules/AddMLIRPython.cmake
@@ -286,7 +286,7 @@ function(declare_mlir_dialect_python_bindings)
cmake_parse_arguments(ARG
"GEN_ENUM_BINDINGS"
"ROOT_DIR;ADD_TO_PARENT;TD_FILE;DIALECT_NAME"
- "SOURCES;SOURCES_GLOB;DEPENDS;GEN_ENUM_BINDINGS_TD_FILE"
+ "SOURCES;SOURCES_GLOB;DEPENDS;GEN_ENUM_BINDINGS_TD_FILE;EXTRA_INCLUDES"
${ARGN})
# Sources.
set(_dialect_target "${ARG_ADD_TO_PARENT}.${ARG_DIALECT_NAME}")
@@ -307,7 +307,7 @@ function(declare_mlir_dialect_python_bindings)
set(LLVM_TARGET_DEFINITIONS ${td_file})
mlir_tablegen("${dialect_filename}"
-gen-python-op-bindings -bind-dialect=${ARG_DIALECT_NAME}
- DEPENDS ${ARG_DEPENDS}
+ DEPENDS ${ARG_DEPENDS} EXTRA_INCLUDES ${ARG_EXTRA_INCLUDES}
)
add_public_tablegen_target(${tblgen_target})
@@ -318,7 +318,7 @@ function(declare_mlir_dialect_python_bindings)
set(LLVM_TARGET_DEFINITIONS ${td_file})
endif()
set(enum_filename "${relative_td_directory}/_${ARG_DIALECT_NAME}_enum_gen.py")
- mlir_tablegen(${enum_filename} -gen-python-enum-bindings)
+ mlir_tablegen(${enum_filename} -gen-python-enum-bindings EXTRA_INCLUDES ${ARG_EXTRA_INCLUDES})
list(APPEND _sources ${enum_filename})
endif()
More information about the Mlir-commits
mailing list