Skip to content

Commit 6c69f59

Browse files
committed
Switch to using the global MLIR_BINDINGS_PYTHON_NB_DOMAIN
1 parent 09dc8ab commit 6c69f59

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

mlir/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,8 @@ configure_file(
174174
# disable all package setup and control it themselves.
175175
#-------------------------------------------------------------------------------
176176

177+
set(MLIR_BINDINGS_PYTHON_NB_DOMAIN "mlir"
178+
CACHE STRING "nanobind domain for MLIR python bindings.")
177179
set(MLIR_ENABLE_BINDINGS_PYTHON 0 CACHE BOOL
178180
"Enables building of Python bindings.")
179181
set(MLIR_DETECT_PYTHON_ENV_PRIME_SEARCH 1 CACHE BOOL

mlir/cmake/modules/AddMLIRPython.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -659,11 +659,11 @@ function(add_mlir_python_extension libname extname)
659659
endif ()
660660

661661
# Avoids domain conflict with nanobind by specifying NB_DOMAIN.
662-
if(NB_DOMAIN)
663-
set(_nb_domain ${NB_DOMAIN})
662+
if(MLIR_BINDINGS_PYTHON_NB_DOMAIN)
663+
set(_nb_domain ${MLIR_BINDINGS_PYTHON_NB_DOMAIN})
664664
else()
665665
set(_nb_domain "mlir")
666-
endif ()
666+
endif()
667667

668668
# The actual extension library produces a shared-object or DLL and has
669669
# sources that must be compiled in accordance with pybind11 needs (RTTI and

0 commit comments

Comments
 (0)