config.hpp 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  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. // See http://www.boost.org/libs/test for the library home page.
  6. //
  7. //!@file
  8. //!@brief a central place for global configuration switches
  9. // ***************************************************************************
  10. #ifndef BOOST_TEST_CONFIG_HPP_071894GER
  11. #define BOOST_TEST_CONFIG_HPP_071894GER
  12. // Boost
  13. #include <boost/config.hpp> // compilers workarounds
  14. #include <boost/detail/workaround.hpp>
  15. #if defined(_WIN32) && !defined(BOOST_DISABLE_WIN32) && \
  16. (!defined(__COMO__) && !defined(__MWERKS__) && !defined(__GNUC__) || \
  17. BOOST_WORKAROUND(__MWERKS__, >= 0x3000))
  18. # define BOOST_SEH_BASED_SIGNAL_HANDLING
  19. #endif
  20. #if defined(__COMO__) && defined(_MSC_VER)
  21. // eh.h uses type_info without declaring it.
  22. class type_info;
  23. # define BOOST_SEH_BASED_SIGNAL_HANDLING
  24. #endif
  25. //____________________________________________________________________________//
  26. #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)) || \
  27. BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600)) || \
  28. (defined __sgi && BOOST_WORKAROUND(_COMPILER_VERSION, BOOST_TESTED_AT(730)))
  29. # define BOOST_TEST_SHIFTED_LINE
  30. #endif
  31. //____________________________________________________________________________//
  32. #if defined(BOOST_MSVC) || (defined(__BORLANDC__) && !defined(BOOST_DISABLE_WIN32))
  33. # define BOOST_TEST_CALL_DECL __cdecl
  34. #else
  35. # define BOOST_TEST_CALL_DECL /**/
  36. #endif
  37. //____________________________________________________________________________//
  38. #if !defined(BOOST_NO_STD_LOCALE) && !defined(__MWERKS__)
  39. # define BOOST_TEST_USE_STD_LOCALE 1
  40. #endif
  41. //____________________________________________________________________________//
  42. #if BOOST_WORKAROUND(__BORLANDC__, <= 0x570) || \
  43. BOOST_WORKAROUND( __COMO__, <= 0x433 ) || \
  44. BOOST_WORKAROUND( __INTEL_COMPILER, <= 800 ) || \
  45. defined(__sgi) && _COMPILER_VERSION <= 730 || \
  46. BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600)) || \
  47. defined(__DECCXX) || \
  48. defined(__DMC__)
  49. # define BOOST_TEST_NO_PROTECTED_USING
  50. #endif
  51. //____________________________________________________________________________//
  52. #if defined(__GNUC__) || BOOST_WORKAROUND(BOOST_MSVC, == 1400)
  53. #define BOOST_TEST_PROTECTED_VIRTUAL virtual
  54. #else
  55. #define BOOST_TEST_PROTECTED_VIRTUAL
  56. #endif
  57. //____________________________________________________________________________//
  58. #if !defined(__BORLANDC__) && !BOOST_WORKAROUND( __SUNPRO_CC, < 0x5100 )
  59. #define BOOST_TEST_SUPPORT_TOKEN_ITERATOR 1
  60. #endif
  61. //____________________________________________________________________________//
  62. #if defined(BOOST_ALL_DYN_LINK) && !defined(BOOST_TEST_DYN_LINK)
  63. # define BOOST_TEST_DYN_LINK
  64. #endif
  65. #if defined(BOOST_TEST_INCLUDED)
  66. # undef BOOST_TEST_DYN_LINK
  67. #endif
  68. #if defined(BOOST_TEST_DYN_LINK)
  69. # define BOOST_TEST_ALTERNATIVE_INIT_API
  70. # ifdef BOOST_TEST_SOURCE
  71. # define BOOST_TEST_DECL BOOST_SYMBOL_EXPORT
  72. # else
  73. # define BOOST_TEST_DECL BOOST_SYMBOL_IMPORT
  74. # endif // BOOST_TEST_SOURCE
  75. #else
  76. # define BOOST_TEST_DECL
  77. #endif
  78. #if !defined(BOOST_TEST_MAIN) && defined(BOOST_AUTO_TEST_MAIN)
  79. #define BOOST_TEST_MAIN BOOST_AUTO_TEST_MAIN
  80. #endif
  81. #if !defined(BOOST_TEST_MAIN) && defined(BOOST_TEST_MODULE)
  82. #define BOOST_TEST_MAIN BOOST_TEST_MODULE
  83. #endif
  84. #ifndef BOOST_PP_VARIADICS /* we can change this only if not already defined) */
  85. #ifdef __PGI
  86. #define BOOST_PP_VARIADICS 1
  87. #endif
  88. #if BOOST_CLANG
  89. #define BOOST_PP_VARIADICS 1
  90. #endif
  91. #if defined(BOOST_GCC) && (BOOST_GCC >= 4 * 10000 + 8 * 100)
  92. #define BOOST_PP_VARIADICS 1
  93. #endif
  94. #endif /* ifndef BOOST_PP_VARIADICS */
  95. #endif // BOOST_TEST_CONFIG_HPP_071894GER