[Mlir-commits] [mlir] [MLIR][Python] use NB_SUPPRESS_WARNINGS (PR #162975)
Maksim Levental
llvmlistbot at llvm.org
Fri Oct 10 23:03:12 PDT 2025
https://github.com/makslevental updated https://github.com/llvm/llvm-project/pull/162975
>From 6b9bd7658719d0fac4d16a297962e15d847225ed Mon Sep 17 00:00:00 2001
From: makslevental <maksim.levental at gmail.com>
Date: Fri, 10 Oct 2025 22:53:27 -0700
Subject: [PATCH] [MLIR][Python] use NB_SUPPRESS_WARNINGS
---
mlir/cmake/modules/AddMLIRPython.cmake | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
diff --git a/mlir/cmake/modules/AddMLIRPython.cmake b/mlir/cmake/modules/AddMLIRPython.cmake
index fa6aec8a603a9..8eb7eeed4276e 100644
--- a/mlir/cmake/modules/AddMLIRPython.cmake
+++ b/mlir/cmake/modules/AddMLIRPython.cmake
@@ -780,6 +780,7 @@ function(add_mlir_python_extension libname extname)
nanobind_add_module(${libname}
NB_DOMAIN ${MLIR_BINDINGS_PYTHON_NB_DOMAIN}
FREE_THREADED
+ NB_SUPPRESS_WARNINGS
${ARG_SOURCES}
)
@@ -792,25 +793,12 @@ function(add_mlir_python_extension libname extname)
target_compile_options(${NB_LIBRARY_TARGET_NAME}
PRIVATE
-Wall -Wextra -Wpedantic
- -Wno-c++98-compat-extra-semi
-Wno-cast-qual
- -Wno-covered-switch-default
- -Wno-deprecated-literal-operator
- -Wno-nested-anon-types
- -Wno-unused-parameter
- -Wno-zero-length-array
${eh_rtti_enable})
target_compile_options(${libname}
PRIVATE
-Wall -Wextra -Wpedantic
- -Wno-c++98-compat-extra-semi
- -Wno-cast-qual
- -Wno-covered-switch-default
- -Wno-deprecated-literal-operator
- -Wno-nested-anon-types
- -Wno-unused-parameter
- -Wno-zero-length-array
${eh_rtti_enable})
endif()
More information about the Mlir-commits
mailing list