1 | #ifndef BOOST_CONFIG_PRAGMA_MESSAGE_HPP_INCLUDED |
2 | #define BOOST_CONFIG_PRAGMA_MESSAGE_HPP_INCLUDED |
3 | |
4 | // Copyright 2017 Peter Dimov. |
5 | // |
6 | // Distributed under the Boost Software License, Version 1.0. |
7 | // |
8 | // See accompanying file LICENSE_1_0.txt or copy at |
9 | // http://www.boost.org/LICENSE_1_0.txt |
10 | // |
11 | // BOOST_PRAGMA_MESSAGE("message") |
12 | // |
13 | // Expands to the equivalent of #pragma message("message") |
14 | // |
15 | // Note that this header is C compatible. |
16 | |
17 | #include <boost/config/helper_macros.hpp> |
18 | |
19 | #if defined(BOOST_DISABLE_PRAGMA_MESSAGE) |
20 | # define BOOST_PRAGMA_MESSAGE(x) |
21 | #elif defined(__INTEL_COMPILER) |
22 | # define BOOST_PRAGMA_MESSAGE(x) __pragma(message(__FILE__ "(" BOOST_STRINGIZE(__LINE__) "): note: " x)) |
23 | #elif defined(__GNUC__) |
24 | # define BOOST_PRAGMA_MESSAGE(x) _Pragma(BOOST_STRINGIZE(message(x))) |
25 | #elif defined(_MSC_VER) |
26 | # define BOOST_PRAGMA_MESSAGE(x) __pragma(message(__FILE__ "(" BOOST_STRINGIZE(__LINE__) "): note: " x)) |
27 | #else |
28 | # define BOOST_PRAGMA_MESSAGE(x) |
29 | #endif |
30 | |
31 | #endif // BOOST_CONFIG_PRAGMA_MESSAGE_HPP_INCLUDED |
32 | |