wave_config_constant.hpp 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. /*=============================================================================
  2. Boost.Wave: A Standard compliant C++ preprocessor library
  3. Persistent application configuration
  4. http://www.boost.org/
  5. Copyright (c) 2001-2012 Hartmut Kaiser. Distributed under the Boost
  6. Software License, Version 1.0. (See accompanying file
  7. LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  8. =============================================================================*/
  9. #if !defined(BOOST_WAVE_CONFIG_CONSTANT_HPP)
  10. #define BOOST_WAVE_CONFIG_CONSTANT_HPP
  11. #include <boost/preprocessor/stringize.hpp>
  12. #include <boost/wave/wave_config.hpp>
  13. ///////////////////////////////////////////////////////////////////////////////
  14. #if BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS != 0
  15. #define BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS_CONFIG 0x00000001
  16. #else
  17. #define BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS_CONFIG 0x00000000
  18. #endif
  19. ///////////////////////////////////////////////////////////////////////////////
  20. #if BOOST_WAVE_SUPPORT_PRAGMA_ONCE != 0
  21. #define BOOST_WAVE_SUPPORT_PRAGMA_ONCE_CONFIG 0x00000002
  22. #else
  23. #define BOOST_WAVE_SUPPORT_PRAGMA_ONCE_CONFIG 0x00000000
  24. #endif
  25. ///////////////////////////////////////////////////////////////////////////////
  26. #if BOOST_WAVE_SUPPORT_MS_EXTENSIONS != 0
  27. #define BOOST_WAVE_SUPPORT_MS_EXTENSIONS_CONFIG 0x00000004
  28. #else
  29. #define BOOST_WAVE_SUPPORT_MS_EXTENSIONS_CONFIG 0x00000000
  30. #endif
  31. ///////////////////////////////////////////////////////////////////////////////
  32. #if BOOST_WAVE_PREPROCESS_PRAGMA_BODY != 0
  33. #define BOOST_WAVE_PREPROCESS_PRAGMA_BODY_CONFIG 0x00000008
  34. #else
  35. #define BOOST_WAVE_PREPROCESS_PRAGMA_BODY_CONFIG 0x00000000
  36. #endif
  37. ///////////////////////////////////////////////////////////////////////////////
  38. #if BOOST_WAVE_USE_STRICT_LEXER != 0
  39. #define BOOST_WAVE_USE_STRICT_LEXER_CONFIG 0x00000010
  40. #else
  41. #define BOOST_WAVE_USE_STRICT_LEXER_CONFIG 0x00000000
  42. #endif
  43. ///////////////////////////////////////////////////////////////////////////////
  44. #if BOOST_WAVE_SUPPORT_IMPORT_KEYWORD != 0
  45. #define BOOST_WAVE_SUPPORT_IMPORT_KEYWORD_CONFIG 0x00000020
  46. #else
  47. #define BOOST_WAVE_SUPPORT_IMPORT_KEYWORD_CONFIG 0x00000000
  48. #endif
  49. ///////////////////////////////////////////////////////////////////////////////
  50. #define BOOST_WAVE_CONFIG ( \
  51. BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS_CONFIG | \
  52. BOOST_WAVE_SUPPORT_PRAGMA_ONCE_CONFIG | \
  53. BOOST_WAVE_SUPPORT_MS_EXTENSIONS_CONFIG | \
  54. BOOST_WAVE_PREPROCESS_PRAGMA_BODY_CONFIG | \
  55. BOOST_WAVE_USE_STRICT_LEXER_CONFIG | \
  56. BOOST_WAVE_SUPPORT_IMPORT_KEYWORD_CONFIG \
  57. ) \
  58. /**/
  59. ///////////////////////////////////////////////////////////////////////////////
  60. namespace boost { namespace wave {
  61. ///////////////////////////////////////////////////////////////////////////
  62. // Call this function to test the configuration of the calling application
  63. // against the configuration of the linked library.
  64. BOOST_WAVE_DECL bool test_configuration(unsigned int config,
  65. char const* pragma_keyword, char const* string_type);
  66. ///////////////////////////////////////////////////////////////////////////////
  67. }} // namespace boost::wave
  68. #define BOOST_WAVE_TEST_CONFIGURATION() \
  69. boost::wave::test_configuration( \
  70. BOOST_WAVE_CONFIG, \
  71. BOOST_WAVE_PRAGMA_KEYWORD, \
  72. BOOST_PP_STRINGIZE((BOOST_WAVE_STRINGTYPE)) \
  73. ) \
  74. /**/
  75. #endif // !BOOST_WAVE_CONFIG_CONSTANT_HPP