kokkos-execution 0.0.1
Loading...
Searching...
No Matches
ignore_warnings.hpp
Go to the documentation of this file.
1#ifndef KOKKOS_EXECUTION_UTILS_IGNORE_WARNINGS_HPP
2#define KOKKOS_EXECUTION_UTILS_IGNORE_WARNINGS_HPP
3
4#define DO_PRAGMA_(x) _Pragma(#x)
5
6#if defined(__clang__)
7# define PRAGMA_DIAGNOSTIC_POP _Pragma("clang diagnostic pop")
8# define PRAGMA_DIAGNOSTIC_PUSH _Pragma("clang diagnostic push")
9//NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
10# define PRAGMA_DIAGNOSTIC_IGNORED(what) DO_PRAGMA_(clang diagnostic ignored what)
11#elif defined(__GNUC__) || defined(__GNUG__)
12# define PRAGMA_DIAGNOSTIC_POP _Pragma("GCC diagnostic pop")
13# define PRAGMA_DIAGNOSTIC_PUSH _Pragma("GCC diagnostic push")
14# define PRAGMA_DIAGNOSTIC_IGNORED(what) DO_PRAGMA_(GCC diagnostic ignored what)
15#else
16# error "Unsupported compiler."
17#endif
18
19#if defined(__clang__)
20# define KOKKOS_EXECUTION_STDEXEC_PRAGMA_DIAGNOSTIC_IGNORED_COMPILER_SPECIFIC \
21 PRAGMA_DIAGNOSTIC_IGNORED("-Wdeprecated-attributes")
22#else
23# define KOKKOS_EXECUTION_STDEXEC_PRAGMA_DIAGNOSTIC_IGNORED_COMPILER_SPECIFIC
24#endif
25
27#if !defined(__DOXYGEN__)
28# define KOKKOS_EXECUTION_STDEXEC_PRAGMA_DIAGNOSTIC_IGNORED \
29 KOKKOS_EXECUTION_STDEXEC_PRAGMA_DIAGNOSTIC_IGNORED_COMPILER_SPECIFIC \
30 PRAGMA_DIAGNOSTIC_IGNORED("-Wdeprecated-copy") \
31 PRAGMA_DIAGNOSTIC_IGNORED("-Wempty-body") \
32 PRAGMA_DIAGNOSTIC_IGNORED("-Wignored-qualifiers") \
33 PRAGMA_DIAGNOSTIC_IGNORED("-Wshadow") \
34 PRAGMA_DIAGNOSTIC_IGNORED("-Wsuggest-override") \
35 PRAGMA_DIAGNOSTIC_IGNORED("-Wswitch-default") \
36 PRAGMA_DIAGNOSTIC_IGNORED("-Wunused-result")
37#else
38# define KOKKOS_EXECUTION_STDEXEC_PRAGMA_DIAGNOSTIC_IGNORED
39#endif
40#endif // KOKKOS_EXECUTION_UTILS_IGNORE_WARNINGS_HPP