libmoost
/home/mhx/git/github/libmoost/include/moost/compiler/pragmas/message.hpp
Go to the documentation of this file.
00001 /* vim:set ts=3 sw=3 sts=3 et: */
00036 #ifndef MOOST_COMPILER_PRAGMAS_MESSAGE_HPP__
00037 #define MOOST_COMPILER_PRAGMAS_MESSAGE_HPP__
00038 
00039 #include <boost/preprocessor/stringize.hpp>
00040 
00053 #if defined( __GNUC__ ) || defined ( _MSC_VER )
00054 #define pragma_message__(msg) \
00055       pragma__(message(__FILE__ "(" BOOST_PP_STRINGIZE(__LINE__) ") : " msg))
00056 #else
00057 #error "pragma message is unsupported"
00058 #endif
00059 
00073 #define pragma_msgtype__(type, msg) pragma_message__(type ": " msg)
00074 
00087 #define pragma_warn__(msg) pragma_msgtype__("warning", msg)
00088 
00089 #endif