File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -672,8 +672,11 @@ function(add_mlir_python_extension libname extname)
672672 ${ARG_SOURCES}
673673 )
674674
675- if (LLVM_COMPILER_IS_GCC_COMPATIBLE OR CLANG_CL)
676- # Avoids warnings from upstream nanobind.
675+ if (NOT MLIR_DISABLE_CONFIGURE_PYTHON_DEV_PACKAGES
676+ AND (LLVM_COMPILER_IS_GCC_COMPATIBLE OR CLANG_CL))
677+ # Avoid some warnings from upstream nanobind.
678+ # If a superproject set MLIR_DISABLE_CONFIGURE_PYTHON_DEV_PACKAGES, let
679+ # the super project handle compile options as it wishes.
677680 set (nanobind_target "nanobind-static" )
678681 if (NOT TARGET ${nanobind_target} )
679682 # Get correct nanobind target name: nanobind-static-ft or something else
@@ -702,7 +705,7 @@ function(add_mlir_python_extension libname extname)
702705 ${eh_rtti_enable}
703706 )
704707 endif ()
705-
708+
706709 if (APPLE )
707710 # NanobindAdaptors.h uses PyClassMethod_New to build `pure_subclass`es but nanobind
708711 # doesn't declare this API as undefined in its linker flags. So we need to declare it as such
You can’t perform that action at this time.
0 commit comments