|
5 | 5 | #ifndef __eigenpy_fwd_hpp__ |
6 | 6 | #define __eigenpy_fwd_hpp__ |
7 | 7 |
|
| 8 | +#if defined(__clang__) |
| 9 | +#define EIGENPY_CLANG_COMPILER |
| 10 | +#elif defined(__GNUC__) |
| 11 | +#define EIGENPY_GCC_COMPILER |
| 12 | +#elif defined(_MSC_VER) |
| 13 | +#define EIGENPY_MSVC_COMPILER |
| 14 | +#endif |
| 15 | + |
| 16 | +#define EIGENPY_STRING_LITERAL(string) #string |
| 17 | + |
| 18 | +// For more details, visit |
| 19 | +// https://stackoverflow.com/questions/171435/portability-of-warning-preprocessor-directive |
| 20 | +#if defined(EIGENPY_CLANG_COMPILER) || defined(EIGENPY_GCC_COMPILER) |
| 21 | +#define EIGENPY_PRAGMA(x) _Pragma(#x) |
| 22 | +#define EIGENPY_PRAGMA_MESSAGE(the_message) \ |
| 23 | + EIGENPY_PRAGMA(GCC message #the_message) |
| 24 | +#define EIGENPY_PRAGMA_WARNING(the_message) \ |
| 25 | + EIGENPY_PRAGMA(GCC warning #the_message) |
| 26 | +#define EIGENPY_PRAGMA_DEPRECATED(the_message) \ |
| 27 | + EIGENPY_PRAGMA_WARNING(Deprecated : #the_message) |
| 28 | +#define EIGENPY_PRAGMA_DEPRECATED_HEADER(old_header, new_header) \ |
| 29 | + EIGENPY_PRAGMA_WARNING( \ |
| 30 | + Deprecated header file \ |
| 31 | + : #old_header has been replaced \ |
| 32 | + by #new_header.\n Please use #new_header instead of #old_header.) |
| 33 | +#elif defined(WIN32) |
| 34 | +#define EIGENPY_PRAGMA(x) __pragma(#x) |
| 35 | +#define EIGENPY_PRAGMA_MESSAGE(the_message) \ |
| 36 | + EIGENPY_PRAGMA(message(#the_message)) |
| 37 | +#define EIGENPY_PRAGMA_WARNING(the_message) \ |
| 38 | + EIGENPY_PRAGMA(message("WARNING: " #the_message)) |
| 39 | +#endif |
| 40 | + |
| 41 | +#define EIGENPY_DEPRECATED_MACRO(macro, the_message) \ |
| 42 | + EIGENPY_PRAGMA_WARNING("this macro is deprecated: " the_message) |
| 43 | +#define EIGENPY_DEPRECATED_FILE(the_message) \ |
| 44 | + EIGENPY_PRAGMA_WARNING(EIGENPY_STRING_LITERAL("this file is deprecated: ") \ |
| 45 | + the_message) |
| 46 | + |
8 | 47 | #include "eigenpy/config.hpp" |
9 | 48 |
|
10 | 49 | // Silence a warning about a deprecated use of boost bind by boost python |
|
0 commit comments