1 //  (C) Copyright Gennadiy Rozental 2001.
2 //  Distributed under the Boost Software License, Version 1.0.
3 //  (See accompanying file LICENSE_1_0.txt or copy at
4 //  http://www.boost.org/LICENSE_1_0.txt)
5 
6 //  See http://www.boost.org/libs/test for the library home page.
7 //
8 //!@file
9 //!@brief a central place for global configuration switches
10 // ***************************************************************************
11 
12 #ifndef BOOST_TEST_CONFIG_HPP_071894GER
13 #define BOOST_TEST_CONFIG_HPP_071894GER
14 
15 // Boost
16 #include <boost/config.hpp> // compilers workarounds
17 #include <boost/detail/workaround.hpp>
18 
19 #if defined(_WIN32) && !defined(BOOST_DISABLE_WIN32) && \
20     (!defined(__COMO__) && !defined(__MWERKS__)      && \
21      !defined(__GNUC__) && !defined(BOOST_EMBTC)     || \
22     BOOST_WORKAROUND(__MWERKS__, >= 0x3000))
23 #  define BOOST_SEH_BASED_SIGNAL_HANDLING
24 #endif
25 
26 #if defined(__COMO__) && defined(_MSC_VER)
27 // eh.h uses type_info without declaring it.
28 class type_info;
29 #  define BOOST_SEH_BASED_SIGNAL_HANDLING
30 #endif
31 
32 //____________________________________________________________________________//
33 
34 #if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x570)) || \
35     BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600))     || \
36     (defined __sgi && BOOST_WORKAROUND(_COMPILER_VERSION, BOOST_TESTED_AT(730)))
37 #  define BOOST_TEST_SHIFTED_LINE
38 #endif
39 
40 //____________________________________________________________________________//
41 
42 #if defined(BOOST_MSVC) || (defined(__BORLANDC__) && !defined(BOOST_DISABLE_WIN32))
43 #  define BOOST_TEST_CALL_DECL __cdecl
44 #else
45 #  define BOOST_TEST_CALL_DECL /**/
46 #endif
47 
48 //____________________________________________________________________________//
49 
50 #if !defined(BOOST_NO_STD_LOCALE) && !defined(__MWERKS__)
51 #  define BOOST_TEST_USE_STD_LOCALE 1
52 #endif
53 
54 //____________________________________________________________________________//
55 
56 #if BOOST_WORKAROUND(BOOST_BORLANDC, <= 0x570)            || \
57     BOOST_WORKAROUND( __COMO__, <= 0x433 )              || \
58     BOOST_WORKAROUND( __INTEL_COMPILER, <= 800 )        || \
59     defined(__sgi) && _COMPILER_VERSION <= 730          || \
60     BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600))  || \
61     defined(__DECCXX)                                   || \
62     defined(__DMC__)
63 #  define BOOST_TEST_NO_PROTECTED_USING
64 #endif
65 
66 //____________________________________________________________________________//
67 
68 #if BOOST_WORKAROUND(BOOST_MSVC, < 1400)
69 #define BOOST_TEST_PROTECTED_VIRTUAL
70 #else
71 #define BOOST_TEST_PROTECTED_VIRTUAL virtual
72 #endif
73 
74 //____________________________________________________________________________//
75 
76 #if !defined(BOOST_BORLANDC) && !BOOST_WORKAROUND( __SUNPRO_CC, < 0x5100 )
77 #define BOOST_TEST_SUPPORT_TOKEN_ITERATOR 1
78 #endif
79 
80 //____________________________________________________________________________//
81 
82 // Sun compiler does not support visibility on enums
83 #if defined(__SUNPRO_CC)
84 #define BOOST_TEST_ENUM_SYMBOL_VISIBLE
85 #else
86 #define BOOST_TEST_ENUM_SYMBOL_VISIBLE BOOST_SYMBOL_VISIBLE
87 #endif
88 
89 //____________________________________________________________________________//
90 
91 #if defined(BOOST_ALL_DYN_LINK) && !defined(BOOST_TEST_DYN_LINK)
92 #  define BOOST_TEST_DYN_LINK
93 #endif
94 
95 // in case any of the define from cmake/b2 is set
96 #if !defined(BOOST_TEST_DYN_LINK) \
97     && (defined(BOOST_UNIT_TEST_FRAMEWORK_DYN_LINK) \
98         || defined(BOOST_TEST_EXEC_MONITOR_DYN_LINK) \
99         || defined(BOOST_PRG_EXEC_MONITOR_DYN_LINK) )
100 #  define BOOST_TEST_DYN_LINK
101 #endif
102 
103 #if defined(BOOST_TEST_INCLUDED)
104 #  undef BOOST_TEST_DYN_LINK
105 #endif
106 
107 #if defined(BOOST_TEST_DYN_LINK)
108 #  define BOOST_TEST_ALTERNATIVE_INIT_API
109 
110 #  ifdef BOOST_TEST_SOURCE
111 #    define BOOST_TEST_DECL BOOST_SYMBOL_EXPORT BOOST_SYMBOL_VISIBLE
112 #  else
113 #    define BOOST_TEST_DECL BOOST_SYMBOL_IMPORT BOOST_SYMBOL_VISIBLE
114 #  endif  // BOOST_TEST_SOURCE
115 #else
116 #  if defined(BOOST_TEST_INCLUDED)
117 #     define BOOST_TEST_DECL
118 #  else
119 #     define BOOST_TEST_DECL BOOST_SYMBOL_VISIBLE
120 #  endif
121 #endif
122 
123 #if !defined(BOOST_TEST_MAIN) && defined(BOOST_AUTO_TEST_MAIN)
124 #define BOOST_TEST_MAIN BOOST_AUTO_TEST_MAIN
125 #endif
126 
127 #if !defined(BOOST_TEST_MAIN) && defined(BOOST_TEST_MODULE)
128 #define BOOST_TEST_MAIN BOOST_TEST_MODULE
129 #endif
130 
131 
132 
133 #ifndef BOOST_PP_VARIADICS /* we can change this only if not already defined */
134 
135 #ifdef __PGI
136 #define BOOST_PP_VARIADICS 1
137 #endif
138 
139 #if BOOST_CLANG
140 #define BOOST_PP_VARIADICS 1
141 #endif
142 
143 #if defined(BOOST_GCC) && (BOOST_GCC >= 4 * 10000 + 8 * 100)
144 #define BOOST_PP_VARIADICS 1
145 #endif
146 
147 #if defined(__NVCC__)
148 #define BOOST_PP_VARIADICS 1
149 #endif
150 
151 #endif /* ifndef BOOST_PP_VARIADICS */
152 
153 // some versions of VC exibit a manifest error with this BOOST_UNREACHABLE_RETURN
154 #if BOOST_WORKAROUND(BOOST_MSVC, < 1910)
155 # define BOOST_TEST_UNREACHABLE_RETURN(x) return x
156 #else
157 # define BOOST_TEST_UNREACHABLE_RETURN(x) BOOST_UNREACHABLE_RETURN(x)
158 #endif
159 
160 //____________________________________________________________________________//
161 // string_view support
162 //____________________________________________________________________________//
163 // note the code should always be compatible with compiled version of boost.test
164 // using a pre-c++17 compiler
165 
166 #ifndef BOOST_NO_CXX17_HDR_STRING_VIEW
167 #define BOOST_TEST_STRING_VIEW
168 #endif
169 
170 #endif // BOOST_TEST_CONFIG_HPP_071894GER
171