MLIR 22.0.0git
Nanobind.h
Go to the documentation of this file.
1//===- Nanobind.h - Trampoline header with ignored warnings ---------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8// This file is a trampoline for the nanobind headers while disabling warnings
9// reported by the LLVM/MLIR build. This file avoids adding complexity build
10// system side.
11//===----------------------------------------------------------------------===//
12
13#ifndef MLIR_BINDINGS_PYTHON_NANOBIND_H
14#define MLIR_BINDINGS_PYTHON_NANOBIND_H
15
16#if defined(__clang__) || defined(__GNUC__)
17#pragma GCC diagnostic push
18#pragma GCC diagnostic ignored "-Wzero-length-array"
19#pragma GCC diagnostic ignored "-Wcast-qual"
20#pragma GCC diagnostic ignored "-Wnested-anon-types"
21#pragma GCC diagnostic ignored "-Wc++98-compat-extra-semi"
22#pragma GCC diagnostic ignored "-Wcovered-switch-default"
23#endif
24#include <nanobind/nanobind.h>
25#include <nanobind/ndarray.h>
26#include <nanobind/stl/function.h>
27#include <nanobind/stl/optional.h>
28#include <nanobind/stl/pair.h>
29#include <nanobind/stl/string.h>
30#include <nanobind/stl/string_view.h>
31#include <nanobind/stl/tuple.h>
32#include <nanobind/stl/vector.h>
33#if defined(__clang__) || defined(__GNUC__)
34#pragma GCC diagnostic pop
35#endif
36
37#endif // MLIR_BINDINGS_PYTHON_NANOBIND_H