37 #ifndef OMPL_UTIL_DISABLE_COMPILER_WARNING_
38 #define OMPL_UTIL_DISABLE_COMPILER_WARNING_
40 #define OMPL_PRAGMA_HELPER0(x) #x
41 #define OMPL_PRAGMA_HELPER1(x, y) OMPL_PRAGMA_HELPER0(x diagnostic ignored y)
44 #define OMPL_PUSH_DISABLE_GCC_WARNING(warning)
46 #define OMPL_PUSH_DISABLE_CLANG_WARNING(warning)
47 #define OMPL_POP_CLANG
49 #if defined(__clang__)
50 #undef OMPL_PUSH_DISABLE_CLANG_WARNING
52 #define OMPL_PUSH_DISABLE_CLANG_WARNING(warning) \
53 _Pragma("clang diagnostic push") \
54 _Pragma(OMPL_PRAGMA_HELPER1(clang, OMPL_PRAGMA_HELPER0(warning)))
55 #define OMPL_POP_CLANG \
56 _Pragma("GCC diagnostic pop")
57 #elif defined __GNUC__
58 #undef OMPL_PUSH_DISABLE_GCC_WARNING
60 #define OMPL_PUSH_DISABLE_GCC_WARNING(warning) \
61 _Pragma("GCC diagnostic push") \
62 _Pragma(OMPL_PRAGMA_HELPER1(GCC, OMPL_PRAGMA_HELPER0(warning)))
63 #define OMPL_POP_GCC \
64 _Pragma("GCC diagnostic pop")