source: NonGTP/Boost/boost/wave/wave_config.hpp @ 857

Revision 857, 11.6 KB checked in by igarcia, 19 years ago (diff)
RevLine 
[857]1/*=============================================================================
2    Boost.Wave: A Standard compliant C++ preprocessor library
3
4    Global application configuration
5   
6    http://www.boost.org/
7
8    Copyright (c) 2001-2005 Hartmut Kaiser. Distributed under the Boost
9    Software License, Version 1.0. (See accompanying file
10    LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
11=============================================================================*/
12
13#if !defined(WAVE_CONFIG_HPP_F143F90A_A63F_4B27_AC41_9CA4F14F538D_INCLUDED)
14#define WAVE_CONFIG_HPP_F143F90A_A63F_4B27_AC41_9CA4F14F538D_INCLUDED
15
16#include <boost/config.hpp>
17#include <boost/detail/workaround.hpp>
18#include <boost/version.hpp>
19#include <boost/spirit/version.hpp>
20#include <boost/wave/wave_version.hpp>
21
22///////////////////////////////////////////////////////////////////////////////
23//  Define the maximal include nesting depth allowed. If this value isn't
24//  defined it defaults to 1024
25//
26//  To define a new initial include nesting depth uncomment the following and
27//  supply a new integer value.
28//
29#if !defined(BOOST_WAVE_MAX_INCLUDE_LEVEL_DEPTH)
30#define BOOST_WAVE_MAX_INCLUDE_LEVEL_DEPTH 1024
31#endif
32
33///////////////////////////////////////////////////////////////////////////////
34//  Decide, whether to support variadics and placemarkers
35//
36//  To implement support variadics and placemarkers uncomment the following
37//
38#if !defined(BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS)
39#define BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS 1
40#endif
41
42///////////////////////////////////////////////////////////////////////////////
43//  Decide, whether to implement a #warning directive as an extension to the
44//  C++ Standard (same as #error, but emits a warning, not an error)
45//
46//  To implement #warning directives, uncomment the following
47//
48#if !defined(BOOST_WAVE_SUPPORT_WARNING_DIRECTIVE)
49#define BOOST_WAVE_SUPPORT_WARNING_DIRECTIVE 1
50#endif
51
52///////////////////////////////////////////////////////////////////////////////
53//  Decide, whether to implement #pragma once
54//
55//  To implement #pragma once, uncomment the following
56//
57#if !defined(BOOST_WAVE_SUPPORT_PRAGMA_ONCE)
58#define BOOST_WAVE_SUPPORT_PRAGMA_ONCE 1
59#endif
60
61///////////////////////////////////////////////////////////////////////////////
62//  Decide, whether to implement #include_next
63//  Please note, that this is an extension to the C++ Standard.
64//
65//  To implement #include_next, uncomment the following
66//
67#if !defined(BOOST_WAVE_SUPPORT_INCLUDE_NEXT)
68#define BOOST_WAVE_SUPPORT_INCLUDE_NEXT 1
69#endif
70
71///////////////////////////////////////////////////////////////////////////////
72//  Undefine the following, to enable some MS specific language extensions:
73//  __int8, __int16, __int32, __int64, __based, __declspec, __cdecl,
74//  __fastcall, __stdcall, __try, __except, __finally, __leave, __inline,
75//  __asm, #region, #endregion
76//
77//  Note: By default this is enabled for Windows based systems, otherwise it's
78//        disabled.
79#if !defined(BOOST_WAVE_SUPPORT_MS_EXTENSIONS)
80#if defined(BOOST_WINDOWS)
81#define BOOST_WAVE_SUPPORT_MS_EXTENSIONS 1
82#else
83#define BOOST_WAVE_SUPPORT_MS_EXTENSIONS 0
84#endif
85#endif
86
87///////////////////////////////////////////////////////////////////////////////
88//  Allow the message body of the #error and #warning directives to be
89//  preprocessed before the diagnostic is issued.
90//
91//  Uncommenting the following will preprocess the message bodies of #error and
92//  #warning messages before the error (warning) is issued
93//
94#if !defined(BOOST_WAVE_PREPROCESS_ERROR_MESSAGE_BODY)
95#define BOOST_WAVE_PREPROCESS_ERROR_MESSAGE_BODY 1
96#endif
97
98///////////////////////////////////////////////////////////////////////////////
99//  Allow the #pragma directives to be returned to the caller (optionally after
100//  preprocessing the body)
101//
102//  Uncommenting the following will skip #pragma directives, so that the caller
103//  will not see them.
104//
105#if !defined(BOOST_WAVE_EMIT_PRAGMA_DIRECTIVES)
106#define BOOST_WAVE_EMIT_PRAGMA_DIRECTIVES 1
107#endif
108
109///////////////////////////////////////////////////////////////////////////////
110//  Allow the body of a #pragma directive to be preprocessed before the
111//  directive is returned to the caller.
112//
113//  Uncommenting the following will preprocess the bodies of #pragma directives
114//
115#if !defined(BOOST_WAVE_PREPROCESS_PRAGMA_BODY)
116#define BOOST_WAVE_PREPROCESS_PRAGMA_BODY 1
117#endif
118
119///////////////////////////////////////////////////////////////////////////////
120//  Allow to define macros with the command line syntax (-DMACRO(x)=definition)
121//
122//  Uncommenting the following will enable the possibility to define macros
123//  based on the command line syntax
124//
125#if !defined(BOOST_WAVE_ENABLE_COMMANDLINE_MACROS)
126#define BOOST_WAVE_ENABLE_COMMANDLINE_MACROS 1
127#endif
128
129///////////////////////////////////////////////////////////////////////////////
130//  Define the string type to be used to store the token values and the file
131//  names inside a file_position template class
132//
133#if !defined(BOOST_WAVE_STRINGTYPE)
134
135#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) || \
136    BOOST_WORKAROUND(__MWERKS__, < 0x3200)
137// VC7 isn't able to compile the flex_string class, fallback to std::string
138// CW upto 8.3 chokes as well *sigh*
139#define BOOST_WAVE_STRINGTYPE std::string
140
141#else
142// use the following, if you have a fast std::allocator<char>
143#define BOOST_WAVE_STRINGTYPE boost::wave::util::flex_string< \
144        char, std::char_traits<char>, std::allocator<char>, \
145        boost::wave::util::CowString</*char, */\
146            boost::wave::util::AllocatorStringStorage<char> \
147        > \
148    > \
149    /**/
150   
151/* #define BOOST_WAVE_STRINGTYPE boost::wave::util::flex_string< \
152        char, std::char_traits<char>, boost::fast_pool_allocator<char>, \
153        boost::wave::util::CowString<char, \
154            boost::wave::util::AllocatorStringStorage<char, \
155              boost::fast_pool_allocator<char> \
156            > \
157        > \
158    > \
159*/    /**/
160   
161//  This include is needed for the flex_string class used in the
162//  BOOST_WAVE_STRINGTYPE above.
163#include <boost/wave/util/flex_string.hpp>
164
165//  This include is needed for the boost::fast_allocator class used in the
166//  BOOST_WAVE_STRINGTYPE above.
167//  Configure Boost.Pool thread support (for now: no thread support at all)
168//#define BOOST_NO_MT
169//#include <boost/pool/pool_alloc.hpp>
170
171// Use the following, if you want to incorporate Maxim Yegorushkin's
172// const_string library (http://sourceforge.net/projects/conststring/), which
173// may be even faster, than using the flex_string class from above
174//#define BOOST_WAVE_STRINGTYPE boost::const_string<char>
175//
176//#include <boost/const_string/const_string.hpp>
177//#include <boost/const_string/io.hpp>
178//#include <boost/const_string/concatenation.hpp>
179
180#endif // BOOST_WORKAROUND(_MSC_VER, <= 1300)
181#endif
182
183///////////////////////////////////////////////////////////////////////////////
184//  Uncomment the following, if you need debug output, the
185//  BOOST_SPIRIT_DEBUG_FLAGS_CPP constants below help to fine control the
186//  amount of the generated debug output.
187//#define BOOST_SPIRIT_DEBUG
188
189///////////////////////////////////////////////////////////////////////////////
190//  Debug flags for the Wave library, possible flags spcified below.
191//
192//  Note: These flags take effect only if the BOOST_SPIRIT_DEBUG constant
193//        above is defined as well.
194#define BOOST_SPIRIT_DEBUG_FLAGS_CPP_GRAMMAR            0x0001
195#define BOOST_SPIRIT_DEBUG_FLAGS_TIME_CONVERSION        0x0002
196#define BOOST_SPIRIT_DEBUG_FLAGS_CPP_EXPR_GRAMMAR       0x0004
197#define BOOST_SPIRIT_DEBUG_FLAGS_INTLIT_GRAMMAR         0x0008
198#define BOOST_SPIRIT_DEBUG_FLAGS_CHLIT_GRAMMAR          0x0010
199#define BOOST_SPIRIT_DEBUG_FLAGS_DEFINED_GRAMMAR        0x0020
200#define BOOST_SPIRIT_DEBUG_FLAGS_PREDEF_MACROS_GRAMMAR  0x0040
201
202#if !defined(BOOST_SPIRIT_DEBUG_FLAGS_CPP)
203#define BOOST_SPIRIT_DEBUG_FLAGS_CPP    0    // default is no debugging
204#endif
205
206///////////////////////////////////////////////////////////////////////////////
207//
208//  For all recognized preprocessor statements the output parse trees
209//  formatted as xml are printed. The formatted parse trees are streamed to the
210//  std::ostream defined by the WAVE_DUMP_PARSE_TREE_OUT constant.
211//
212//  Uncomment the following, if you want to see these parse trees.
213//
214#if !defined(BOOST_WAVE_DUMP_PARSE_TREE)
215#define BOOST_WAVE_DUMP_PARSE_TREE 0
216#endif
217#if BOOST_WAVE_DUMP_PARSE_TREE != 0 && !defined(BOOST_WAVE_DUMP_PARSE_TREE_OUT)
218#define BOOST_WAVE_DUMP_PARSE_TREE_OUT std::cerr
219#endif
220
221///////////////////////////////////////////////////////////////////////////////
222//
223//  For all #if and #elif directives the preprocessed expressions are printed.
224//  These expressions are streamed to the std::ostream defined by the
225//  BOOST_WAVE_DUMP_CONDITIONAL_EXPRESSIONS_OUT constant.
226//
227//  Uncomment the following, if you want to see the preprocessed expressions
228//
229#if !defined(BOOST_WAVE_DUMP_CONDITIONAL_EXPRESSIONS)
230#define BOOST_WAVE_DUMP_CONDITIONAL_EXPRESSIONS 0
231#endif
232#if BOOST_WAVE_DUMP_CONDITIONAL_EXPRESSIONS != 0 && \
233   !defined(BOOST_WAVE_DUMP_CONDITIONAL_EXPRESSIONS_OUT)
234#define BOOST_WAVE_DUMP_CONDITIONAL_EXPRESSIONS_OUT std::cerr
235#endif
236
237///////////////////////////////////////////////////////////////////////////////
238//  Decide, whether to use the separate compilation model for the instantiation
239//  of the C++ lexer objects.
240//
241//  If this is defined, you should explicitly instantiate the C++ lexer
242//  template with the correct parameters in a separate compilation unit of
243//  your program (see the file instantiate_re2c_lexer.cpp).
244//
245//  To use the lexer inclusion model, uncomment the following
246//
247#if !defined(BOOST_WAVE_SEPARATE_LEXER_INSTANTIATION)
248#define BOOST_WAVE_SEPARATE_LEXER_INSTANTIATION 1
249#endif
250
251///////////////////////////////////////////////////////////////////////////////
252//  Decide, whether to use the separate compilation model for the instantiation
253//  of the grammar objects.
254//
255//  If this is defined, you should explicitly instantiate the grammar
256//  templates with the correct parameters in a separate compilation unit of
257//  your program (see the files instantiate_cpp_grammar.cpp et.al.).
258//
259//  To use the grammar inclusion model, uncomment the following
260//
261#if !defined(BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION)
262#define BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION 1
263#endif
264
265///////////////////////////////////////////////////////////////////////////////
266//  configure Boost.Pool thread support (for now: no thread support at all)
267#if !defined(BOOST_NO_MT)
268#define BOOST_NO_MT
269#endif // !defined(BOOST_NO_MT)
270
271//#if !defined(BOOST_DISABLE_THREADS)
272//#define BOOST_DISABLE_THREADS
273//#endif // !defined(BOOST_DISABLE_THREADS)
274
275///////////////////////////////////////////////////////////////////////////////
276//  Wave needs at least 4 parameters for phoenix actors
277#define PHOENIX_LIMIT 6
278
279///////////////////////////////////////////////////////////////////////////////
280//  Auto library naming
281#if BOOST_VERSION >= 103100   
282// auto link features work beginning from Boost V1.31.0
283#if !defined(BOOST_WAVE_SOURCE) && !defined(BOOST_ALL_NO_LIB) && \
284    !defined(BOOST_WAVE_NO_LIB)
285
286#define BOOST_LIB_NAME boost_wave
287
288// tell the auto-link code to select a dll when required:
289#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_WAVE_DYN_LINK)
290#define BOOST_DYN_LINK
291#endif
292
293#include <boost/config/auto_link.hpp>
294
295#endif  // auto-linking disabled
296#endif  // BOOST_VERSION
297
298#endif // !defined(WAVE_CONFIG_HPP_F143F90A_A63F_4B27_AC41_9CA4F14F538D_INCLUDED)
Note: See TracBrowser for help on using the repository browser.