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