]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/test/detail/config.hpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / boost / test / detail / config.hpp
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__) && !defined(__GNUC__) || \
21 BOOST_WORKAROUND(__MWERKS__, >= 0x3000))
22 # define BOOST_SEH_BASED_SIGNAL_HANDLING
23 #endif
24
25 #if defined(__COMO__) && defined(_MSC_VER)
26 // eh.h uses type_info without declaring it.
27 class type_info;
28 # define BOOST_SEH_BASED_SIGNAL_HANDLING
29 #endif
30
31 //____________________________________________________________________________//
32
33 #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)) || \
34 BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600)) || \
35 (defined __sgi && BOOST_WORKAROUND(_COMPILER_VERSION, BOOST_TESTED_AT(730)))
36 # define BOOST_TEST_SHIFTED_LINE
37 #endif
38
39 //____________________________________________________________________________//
40
41 #if defined(BOOST_MSVC) || (defined(__BORLANDC__) && !defined(BOOST_DISABLE_WIN32))
42 # define BOOST_TEST_CALL_DECL __cdecl
43 #else
44 # define BOOST_TEST_CALL_DECL /**/
45 #endif
46
47 //____________________________________________________________________________//
48
49 #if !defined(BOOST_NO_STD_LOCALE) && !defined(__MWERKS__)
50 # define BOOST_TEST_USE_STD_LOCALE 1
51 #endif
52
53 //____________________________________________________________________________//
54
55 #if BOOST_WORKAROUND(__BORLANDC__, <= 0x570) || \
56 BOOST_WORKAROUND( __COMO__, <= 0x433 ) || \
57 BOOST_WORKAROUND( __INTEL_COMPILER, <= 800 ) || \
58 defined(__sgi) && _COMPILER_VERSION <= 730 || \
59 BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600)) || \
60 defined(__DECCXX) || \
61 defined(__DMC__)
62 # define BOOST_TEST_NO_PROTECTED_USING
63 #endif
64
65 //____________________________________________________________________________//
66
67 #if defined(__GNUC__) || BOOST_WORKAROUND(BOOST_MSVC, == 1400)
68 #define BOOST_TEST_PROTECTED_VIRTUAL virtual
69 #else
70 #define BOOST_TEST_PROTECTED_VIRTUAL
71 #endif
72
73 //____________________________________________________________________________//
74
75 #if !defined(__BORLANDC__) && !BOOST_WORKAROUND( __SUNPRO_CC, < 0x5100 )
76 #define BOOST_TEST_SUPPORT_TOKEN_ITERATOR 1
77 #endif
78
79 //____________________________________________________________________________//
80
81 // Sun compiler does not support visibility on enums
82 #if defined(__SUNPRO_CC)
83 #define BOOST_TEST_ENUM_SYMBOL_VISIBLE
84 #else
85 #define BOOST_TEST_ENUM_SYMBOL_VISIBLE BOOST_SYMBOL_VISIBLE
86 #endif
87
88 //____________________________________________________________________________//
89
90 #if defined(BOOST_ALL_DYN_LINK) && !defined(BOOST_TEST_DYN_LINK)
91 # define BOOST_TEST_DYN_LINK
92 #endif
93
94 // in case any of the define from cmake/b2 is set
95 #if !defined(BOOST_TEST_DYN_LINK) \
96 && (defined(BOOST_UNIT_TEST_FRAMEWORK_DYN_LINK) \
97 || defined(BOOST_TEST_EXEC_MONITOR_DYN_LINK) \
98 || defined(BOOST_PRG_EXEC_MONITOR_DYN_LINK) )
99 # define BOOST_TEST_DYN_LINK
100 #endif
101
102 #if defined(BOOST_TEST_INCLUDED)
103 # undef BOOST_TEST_DYN_LINK
104 #endif
105
106 #if defined(BOOST_TEST_DYN_LINK)
107 # define BOOST_TEST_ALTERNATIVE_INIT_API
108
109 # ifdef BOOST_TEST_SOURCE
110 # define BOOST_TEST_DECL BOOST_SYMBOL_EXPORT BOOST_SYMBOL_VISIBLE
111 # else
112 # define BOOST_TEST_DECL BOOST_SYMBOL_IMPORT BOOST_SYMBOL_VISIBLE
113 # endif // BOOST_TEST_SOURCE
114 #else
115 # define BOOST_TEST_DECL BOOST_SYMBOL_VISIBLE
116 #endif
117
118 #if !defined(BOOST_TEST_MAIN) && defined(BOOST_AUTO_TEST_MAIN)
119 #define BOOST_TEST_MAIN BOOST_AUTO_TEST_MAIN
120 #endif
121
122 #if !defined(BOOST_TEST_MAIN) && defined(BOOST_TEST_MODULE)
123 #define BOOST_TEST_MAIN BOOST_TEST_MODULE
124 #endif
125
126
127
128 #ifndef BOOST_PP_VARIADICS /* we can change this only if not already defined) */
129
130 #ifdef __PGI
131 #define BOOST_PP_VARIADICS 1
132 #endif
133
134 #if BOOST_CLANG
135 #define BOOST_PP_VARIADICS 1
136 #endif
137
138 #if defined(BOOST_GCC) && (BOOST_GCC >= 4 * 10000 + 8 * 100)
139 #define BOOST_PP_VARIADICS 1
140 #endif
141
142 #endif /* ifndef BOOST_PP_VARIADICS */
143
144 //____________________________________________________________________________//
145 // string_view support
146 //____________________________________________________________________________//
147 // note the code should always be compatible with compiled version of boost.test
148 // using a pre-c++17 compiler
149
150 #ifndef BOOST_NO_CXX17_HDR_STRING_VIEW
151 #define BOOST_TEST_STRING_VIEW
152 #endif
153
154 #endif // BOOST_TEST_CONFIG_HPP_071894GER