Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/boost/wave/wave_config.hpp @ 29

Last change on this file since 29 was 29, checked in by landauf, 16 years ago

updated boost from 1_33_1 to 1_34_1

File size: 15.6 KB
Line 
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-2007 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 define the following constant
27//  before including this file.
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 define the following to
37//  something not equal to zero.
38//
39#if !defined(BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS)
40#define BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS 1
41#endif
42
43///////////////////////////////////////////////////////////////////////////////
44//  Decide, whether to implement a #warning directive as an extension to the
45//  C++ Standard (same as #error, but emits a warning, not an error)
46//
47//  To disable the implementation of #warning directives, define the following
48//  constant as zero before including this file.
49//
50#if !defined(BOOST_WAVE_SUPPORT_WARNING_DIRECTIVE)
51#define BOOST_WAVE_SUPPORT_WARNING_DIRECTIVE 1
52#endif
53
54///////////////////////////////////////////////////////////////////////////////
55//  Decide, whether to implement #pragma once
56//
57//  To disable the implementation of #pragma once, define the following
58//  constant as zero before including this file.
59//
60#if !defined(BOOST_WAVE_SUPPORT_PRAGMA_ONCE)
61#define BOOST_WAVE_SUPPORT_PRAGMA_ONCE 1
62#endif
63
64///////////////////////////////////////////////////////////////////////////////
65//  Decide, whether to implement #pragma message("")
66//
67//  To disable the implementation of #pragma message(""), define the following
68//  constant as zero before including this file.
69//
70#if !defined(BOOST_WAVE_SUPPORT_PRAGMA_MESSAGE)
71#define BOOST_WAVE_SUPPORT_PRAGMA_MESSAGE 1
72#endif
73
74///////////////////////////////////////////////////////////////////////////////
75//  Decide, whether to implement #include_next
76//  Please note, that this is an extension to the C++ Standard.
77//
78//  To disable the implementation of #include_next, define the following
79//  constant as zero before including this file.
80//
81#if !defined(BOOST_WAVE_SUPPORT_INCLUDE_NEXT)
82#define BOOST_WAVE_SUPPORT_INCLUDE_NEXT 1
83#endif
84
85///////////////////////////////////////////////////////////////////////////////
86//  Undefine the following, to enable some MS specific language extensions:
87//  __int8, __int16, __int32, __int64, __based, __declspec, __cdecl,
88//  __fastcall, __stdcall, __try, __except, __finally, __leave, __inline,
89//  __asm, #region, #endregion
90//
91//  Note: By default this is enabled for Windows based systems, otherwise it's
92//        disabled.
93#if !defined(BOOST_WAVE_SUPPORT_MS_EXTENSIONS)
94#if defined(BOOST_WINDOWS)
95#define BOOST_WAVE_SUPPORT_MS_EXTENSIONS 1
96#else
97#define BOOST_WAVE_SUPPORT_MS_EXTENSIONS 0
98#endif
99#endif
100
101///////////////////////////////////////////////////////////////////////////////
102//  Allow the message body of the #error and #warning directives to be
103//  preprocessed before the diagnostic is issued.
104//
105//  To disable preprocessing of the body of #error and #warning directives,
106//  define the following constant as zero before including this file.
107//
108#if !defined(BOOST_WAVE_PREPROCESS_ERROR_MESSAGE_BODY)
109#define BOOST_WAVE_PREPROCESS_ERROR_MESSAGE_BODY 1
110#endif
111
112///////////////////////////////////////////////////////////////////////////////
113//  Allow the #pragma directives to be returned to the caller (optionally after
114//  preprocessing the body)
115//
116//  To disable the library to emit unknown #pragma directives, define the
117//  following constant as zero before including this file.
118//
119#if !defined(BOOST_WAVE_EMIT_PRAGMA_DIRECTIVES)
120#define BOOST_WAVE_EMIT_PRAGMA_DIRECTIVES 1
121#endif
122
123///////////////////////////////////////////////////////////////////////////////
124//  Allow the body of a #pragma directive to be preprocessed before the
125//  directive is returned to the caller.
126//
127//  To disable the preprocessing of the body of #pragma directives, define the
128//  following constant as zero before including this file.
129//
130#if !defined(BOOST_WAVE_PREPROCESS_PRAGMA_BODY)
131#define BOOST_WAVE_PREPROCESS_PRAGMA_BODY 1
132#endif
133
134///////////////////////////////////////////////////////////////////////////////
135//  Allow to define macros with the command line syntax (-DMACRO(x)=definition)
136//
137//  To disable the the possibility to define macros based on the command line
138//  syntax, define the following constant as zero before including this file.
139//
140#if !defined(BOOST_WAVE_ENABLE_COMMANDLINE_MACROS)
141#define BOOST_WAVE_ENABLE_COMMANDLINE_MACROS 1
142#endif
143
144///////////////////////////////////////////////////////////////////////////////
145//  Define the pragma keyword to be used by the library to recognize its own
146//  pragma's. If nothing else is defined, then 'wave' will be used as the
147//  default keyword, i.e. the library recognizes all
148//
149//      #pragma wave option [(argument)]
150//
151//  and dispatches the handling to the interpret_pragma() preprocessing hook
152//  function (see file: preprocessing_hooks.hpp). The arguments part of the
153//  pragma is optional.
154//  The BOOST_WAVE_PRAGMA_KEYWORD constant needs to be defined to
155//  resolve as a string literal value.
156#if !defined(BOOST_WAVE_PRAGMA_KEYWORD)
157#define BOOST_WAVE_PRAGMA_KEYWORD "wave"
158#endif
159
160///////////////////////////////////////////////////////////////////////////////
161//  Define the string type to be used to store the token values and the file
162//  names inside a file_position template class
163//
164#if !defined(BOOST_WAVE_STRINGTYPE)
165
166#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) || \
167    BOOST_WORKAROUND(__MWERKS__, < 0x3200) || \
168    (defined(__DECCXX) && defined(__alpha)) || \
169    defined(BOOST_WAVE_STRINGTYPE_USE_STDSTRING)
170   
171// VC7 isn't able to compile the flex_string class, fall back to std::string
172// CW up to 8.3 chokes as well *sigh*
173// Tru64/CXX has linker problems when using flex_string
174#define BOOST_WAVE_STRINGTYPE std::string
175#if !defined(BOOST_WAVE_STRINGTYPE_USE_STDSTRING)
176#define BOOST_WAVE_STRINGTYPE_USE_STDSTRING 1
177#endif
178
179#else
180// use the following, if you have a fast std::allocator<char>
181#define BOOST_WAVE_STRINGTYPE boost::wave::util::flex_string< \
182        char, std::char_traits<char>, std::allocator<char>, \
183        boost::wave::util::CowString</*char, */\
184            boost::wave::util::AllocatorStringStorage<char> \
185        > \
186    > \
187    /**/
188   
189/* #define BOOST_WAVE_STRINGTYPE boost::wave::util::flex_string< \
190        char, std::char_traits<char>, boost::fast_pool_allocator<char>, \
191        boost::wave::util::CowString<char, \
192            boost::wave::util::AllocatorStringStorage<char, \
193              boost::fast_pool_allocator<char> \
194            > \
195        > \
196    > \
197*/    /**/
198   
199//  This include is needed for the flex_string class used in the
200//  BOOST_WAVE_STRINGTYPE above.
201#include <boost/wave/util/flex_string.hpp>
202
203//  This include is needed for the boost::fast_allocator class used in the
204//  BOOST_WAVE_STRINGTYPE above.
205//  Configure Boost.Pool thread support (for now: no thread support at all)
206//#define BOOST_NO_MT
207//#include <boost/pool/pool_alloc.hpp>
208
209// Use the following, if you want to incorporate Maxim Yegorushkin's
210// const_string library (http://sourceforge.net/projects/conststring/), which
211// may be even faster, than using the flex_string class from above
212//#define BOOST_WAVE_STRINGTYPE boost::const_string<char>
213//
214//#include <boost/const_string/const_string.hpp>
215//#include <boost/const_string/io.hpp>
216//#include <boost/const_string/concatenation.hpp>
217
218#endif // BOOST_WORKAROUND(_MSC_VER, <= 1300)
219#endif
220
221///////////////////////////////////////////////////////////////////////////////
222//  The following definition forces the Spirit tree code to use list's instead
223//  of vectors, which may be more efficient on some platforms
224// #define BOOST_SPIRIT_USE_LIST_FOR_TREES
225
226///////////////////////////////////////////////////////////////////////////////
227//  The following definition forces the Spirit tree code to use boost pool
228//  allocators in stead of the std::allocator for the vector/list's.
229// #define BOOST_SPIRIT_USE_BOOST_ALLOCATOR_FOR_TREES
230
231///////////////////////////////////////////////////////////////////////////////
232//  Uncomment the following, if you need debug output, the
233//  BOOST_SPIRIT_DEBUG_FLAGS_CPP constants below help to fine control the
234//  amount of the generated debug output.
235//#define BOOST_SPIRIT_DEBUG
236
237///////////////////////////////////////////////////////////////////////////////
238//  Debug flags for the Wave library, possible flags specified below.
239//
240//  Note: These flags take effect only if the BOOST_SPIRIT_DEBUG constant
241//        above is defined as well.
242#define BOOST_SPIRIT_DEBUG_FLAGS_CPP_GRAMMAR            0x0001
243#define BOOST_SPIRIT_DEBUG_FLAGS_TIME_CONVERSION        0x0002
244#define BOOST_SPIRIT_DEBUG_FLAGS_CPP_EXPR_GRAMMAR       0x0004
245#define BOOST_SPIRIT_DEBUG_FLAGS_INTLIT_GRAMMAR         0x0008
246#define BOOST_SPIRIT_DEBUG_FLAGS_CHLIT_GRAMMAR          0x0010
247#define BOOST_SPIRIT_DEBUG_FLAGS_DEFINED_GRAMMAR        0x0020
248#define BOOST_SPIRIT_DEBUG_FLAGS_PREDEF_MACROS_GRAMMAR  0x0040
249
250#if !defined(BOOST_SPIRIT_DEBUG_FLAGS_CPP)
251#define BOOST_SPIRIT_DEBUG_FLAGS_CPP    0    // default is no debugging
252#endif
253
254///////////////////////////////////////////////////////////////////////////////
255//
256//  For all recognized preprocessor statements the output parse trees
257//  formatted as xml are printed. The formatted parse trees are streamed to the
258//  std::ostream defined by the WAVE_DUMP_PARSE_TREE_OUT constant.
259//
260//  To enable the output of these parse trees, define the following constant
261//  as zero something not equal to zero before including this file.
262//
263#if !defined(BOOST_WAVE_DUMP_PARSE_TREE)
264#define BOOST_WAVE_DUMP_PARSE_TREE 0
265#endif
266#if BOOST_WAVE_DUMP_PARSE_TREE != 0 && !defined(BOOST_WAVE_DUMP_PARSE_TREE_OUT)
267#define BOOST_WAVE_DUMP_PARSE_TREE_OUT std::cerr
268#endif
269
270///////////////////////////////////////////////////////////////////////////////
271//
272//  For all #if and #elif directives the preprocessed expressions are printed.
273//  These expressions are streamed to the std::ostream defined by the
274//  BOOST_WAVE_DUMP_CONDITIONAL_EXPRESSIONS_OUT constant.
275//
276//  To enable the output of the preprocessed expressions, define the following
277//  constant as something not equal to zero before including this file.
278//
279#if !defined(BOOST_WAVE_DUMP_CONDITIONAL_EXPRESSIONS)
280#define BOOST_WAVE_DUMP_CONDITIONAL_EXPRESSIONS 0
281#endif
282#if BOOST_WAVE_DUMP_CONDITIONAL_EXPRESSIONS != 0 && \
283   !defined(BOOST_WAVE_DUMP_CONDITIONAL_EXPRESSIONS_OUT)
284#define BOOST_WAVE_DUMP_CONDITIONAL_EXPRESSIONS_OUT std::cerr
285#endif
286
287///////////////////////////////////////////////////////////////////////////////
288//  Decide, whether to use the separate compilation model for the instantiation
289//  of the C++ lexer objects.
290//
291//  If this is defined, you should explicitly instantiate the C++ lexer
292//  template with the correct parameters in a separate compilation unit of
293//  your program (see the file instantiate_re2c_lexer.cpp).
294//
295//  To use the lexer inclusion model, define the following constant as
296//  something not equal to zero before including this file.
297//
298#if !defined(BOOST_WAVE_SEPARATE_LEXER_INSTANTIATION)
299#define BOOST_WAVE_SEPARATE_LEXER_INSTANTIATION 1
300#endif
301
302///////////////////////////////////////////////////////////////////////////////
303//  Decide, whether to use the separate compilation model for the instantiation
304//  of the grammar objects.
305//
306//  If this is defined, you should explicitly instantiate the grammar
307//  templates with the correct parameters in a separate compilation unit of
308//  your program (see the files instantiate_cpp_grammar.cpp et.al.).
309//
310//  To use the grammar inclusion model, define the following constant as
311//  something not equal to zero before including this file.
312//
313#if !defined(BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION)
314#define BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION 1
315#endif
316
317///////////////////////////////////////////////////////////////////////////////
318//  Decide whether to use a strict C++ lexer.
319// 
320//  If this is defined to something != 0, then the C++ lexers recognize the
321//  strict C99/C++ basic source character set. If it is not defined or defined
322//  to zero, the C++ lexers recognize the '$' character as part of identifiers.
323//
324//  The default is to recognize the '$' character as part of identifiers.
325//
326#if !defined(BOOST_WAVE_USE_STRICT_LEXER)
327#define BOOST_WAVE_USE_STRICT_LEXER 0
328#endif
329
330///////////////////////////////////////////////////////////////////////////////
331//  Decide, whether the serialization of the wave::context class should be
332//  supported
333//
334//  If this is defined to something not equal to zero the generated code will
335//  expose routines allowing to store and reload the internal state of the
336//  wave::context object.
337//
338//  To enable the availability of the serialization functionality, define the
339//  following constant as something not equal to zero before including this file.
340//
341#if !defined(BOOST_WAVE_SERIALIZATION)
342#define BOOST_WAVE_SERIALIZATION 0
343#endif
344
345///////////////////////////////////////////////////////////////////////////////
346//  configure Boost.Pool thread support (for now: no thread support at all)
347#if !defined(BOOST_NO_MT)
348#define BOOST_NO_MT
349#endif // !defined(BOOST_NO_MT)
350
351//#if !defined(BOOST_DISABLE_THREADS)
352//#define BOOST_DISABLE_THREADS
353//#endif // !defined(BOOST_DISABLE_THREADS)
354
355///////////////////////////////////////////////////////////////////////////////
356//  Wave needs at least 4 parameters for phoenix actors
357#if !defined(PHOENIX_LIMIT)
358#define PHOENIX_LIMIT 6
359#endif
360#if PHOENIX_LIMIT < 6
361#error "Boost.Wave: the constant PHOENIX_LIMIT must be at least defined to 4" \
362       " to compile the library."
363#endif
364
365///////////////////////////////////////////////////////////////////////////////
366//  Set up dll import/export options
367#if defined(BOOST_HAS_DECLSPEC) && \
368    (defined(BOOST_WAVE_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)) && \
369    !defined(BOOST_WAVE_STATIC_LINK)
370   
371#if defined(BOOST_WAVE_SOURCE)
372#define BOOST_WAVE_DECL __declspec(dllexport)
373#define BOOST_WAVE_BUILD_DLL
374#else
375#define BOOST_WAVE_DECL __declspec(dllimport)
376#endif
377
378#endif // building a shared library
379
380#ifndef BOOST_WAVE_DECL
381#define BOOST_WAVE_DECL
382#endif
383
384///////////////////////////////////////////////////////////////////////////////
385//  Auto library naming
386#if BOOST_VERSION >= 103100   
387// auto link features work beginning from Boost V1.31.0
388#if !defined(BOOST_WAVE_SOURCE) && !defined(BOOST_ALL_NO_LIB) && \
389    !defined(BOOST_WAVE_NO_LIB)
390
391#define BOOST_LIB_NAME boost_wave
392
393// tell the auto-link code to select a dll when required:
394#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_WAVE_DYN_LINK)
395#define BOOST_DYN_LINK
396#endif
397
398#include <boost/config/auto_link.hpp>
399
400#endif  // auto-linking disabled
401#endif  // BOOST_VERSION
402
403#endif // !defined(WAVE_CONFIG_HPP_F143F90A_A63F_4B27_AC41_9CA4F14F538D_INCLUDED)
Note: See TracBrowser for help on using the repository browser.