pragma_message.hpp 1019 B

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