Suppress BOOST_PRAGMA_MESSAGE messages when BOOST_DISABLE_PRAGMA_MESSAGE is defined

This commit is contained in:
Peter Dimov
2017-12-04 19:15:36 +02:00
parent 08bd1dbe71
commit 23327d6d01

View File

@ -16,12 +16,14 @@
#include <boost/config/helper_macros.hpp>
#if defined(__GNUC__)
#define BOOST_PRAGMA_MESSAGE(x) _Pragma(BOOST_STRINGIZE(message(x)))
#if defined(BOOST_DISABLE_PRAGMA_MESSAGE)
# define BOOST_PRAGMA_MESSAGE(x)
#elif defined(__GNUC__)
# define BOOST_PRAGMA_MESSAGE(x) _Pragma(BOOST_STRINGIZE(message(x)))
#elif defined(_MSC_VER)
#define BOOST_PRAGMA_MESSAGE(x) __pragma(message(__FILE__ "(" BOOST_STRINGIZE(__LINE__) "): note: " x))
# define BOOST_PRAGMA_MESSAGE(x) __pragma(message(__FILE__ "(" BOOST_STRINGIZE(__LINE__) "): note: " x))
#else
#define BOOST_PRAGMA_MESSAGE(x)
# define BOOST_PRAGMA_MESSAGE(x)
#endif
#endif // BOOST_CONFIG_PRAGMA_MESSAGE_HPP_INCLUDED