Files

32 lines
1.1 KiB
C++

#ifndef ACTIV_BOOST_CONFIG_PRAGMA_MESSAGE_HPP_INCLUDED
#define ACTIV_BOOST_CONFIG_PRAGMA_MESSAGE_HPP_INCLUDED
// Copyright 2017 Peter Dimov.
//
// Distributed under the Boost Software License, Version 1.0.
//
// See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt
//
// ACTIV_BOOST_PRAGMA_MESSAGE("message")
//
// Expands to the equivalent of #pragma message("message")
//
// Note that this header is C compatible.
#include <ActivBoost/config/helper_macros.hpp>
#if defined(ACTIV_BOOST_DISABLE_PRAGMA_MESSAGE)
# define ACTIV_BOOST_PRAGMA_MESSAGE(x)
#elif defined(__INTEL_COMPILER)
# define ACTIV_BOOST_PRAGMA_MESSAGE(x) __pragma(message(__FILE__ "(" ACTIV_BOOST_STRINGIZE(__LINE__) "): note: " x))
#elif defined(__GNUC__)
# define ACTIV_BOOST_PRAGMA_MESSAGE(x) _Pragma(ACTIV_BOOST_STRINGIZE(message(x)))
#elif defined(_MSC_VER)
# define ACTIV_BOOST_PRAGMA_MESSAGE(x) __pragma(message(__FILE__ "(" ACTIV_BOOST_STRINGIZE(__LINE__) "): note: " x))
#else
# define ACTIV_BOOST_PRAGMA_MESSAGE(x)
#endif
#endif // ACTIV_BOOST_CONFIG_PRAGMA_MESSAGE_HPP_INCLUDED