annotate DEPENDENCIES/generic/include/boost/chrono/config.hpp @ 16:2665513ce2d3

Add boost headers
author Chris Cannam
date Tue, 05 Aug 2014 11:11:38 +0100
parents
children c530137014c0
rev   line source
Chris@16 1 // boost/chrono/config.hpp -------------------------------------------------//
Chris@16 2
Chris@16 3 // Copyright Beman Dawes 2003, 2006, 2008
Chris@16 4 // Copyright 2009-2011 Vicente J. Botet Escriba
Chris@16 5
Chris@16 6 // Distributed under the Boost Software License, Version 1.0. (See accompanying
Chris@16 7 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Chris@16 8
Chris@16 9 // See http://www.boost.org/libs/chrono for documentation.
Chris@16 10
Chris@16 11 #ifndef BOOST_CHRONO_CONFIG_HPP
Chris@16 12 #define BOOST_CHRONO_CONFIG_HPP
Chris@16 13
Chris@16 14 #include <boost/config.hpp>
Chris@16 15
Chris@16 16 #if !defined BOOST_CHRONO_VERSION
Chris@16 17 #define BOOST_CHRONO_VERSION 1
Chris@16 18 #else
Chris@16 19 #if BOOST_CHRONO_VERSION!=1 && BOOST_CHRONO_VERSION!=2
Chris@16 20 #error "BOOST_CHRONO_VERSION must be 1 or 2"
Chris@16 21 #endif
Chris@16 22 #endif
Chris@16 23
Chris@16 24 #if defined(BOOST_CHRONO_SOURCE) && !defined(BOOST_USE_WINDOWS_H)
Chris@16 25 #define BOOST_USE_WINDOWS_H
Chris@16 26 #endif
Chris@16 27
Chris@16 28 #if ! defined BOOST_CHRONO_PROVIDES_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT \
Chris@16 29 && ! defined BOOST_CHRONO_DONT_PROVIDE_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT
Chris@16 30
Chris@16 31 # define BOOST_CHRONO_PROVIDES_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT
Chris@16 32
Chris@16 33 #endif
Chris@16 34
Chris@16 35 // BOOST_CHRONO_POSIX_API, BOOST_CHRONO_MAC_API, or BOOST_CHRONO_WINDOWS_API
Chris@16 36 // can be defined by the user to specify which API should be used
Chris@16 37
Chris@16 38 #if defined(BOOST_CHRONO_WINDOWS_API)
Chris@16 39 # warning Boost.Chrono will use the Windows API
Chris@16 40 #elif defined(BOOST_CHRONO_MAC_API)
Chris@16 41 # warning Boost.Chrono will use the Mac API
Chris@16 42 #elif defined(BOOST_CHRONO_POSIX_API)
Chris@16 43 # warning Boost.Chrono will use the POSIX API
Chris@16 44 #endif
Chris@16 45
Chris@16 46 # if defined( BOOST_CHRONO_WINDOWS_API ) && defined( BOOST_CHRONO_POSIX_API )
Chris@16 47 # error both BOOST_CHRONO_WINDOWS_API and BOOST_CHRONO_POSIX_API are defined
Chris@16 48 # elif defined( BOOST_CHRONO_WINDOWS_API ) && defined( BOOST_CHRONO_MAC_API )
Chris@16 49 # error both BOOST_CHRONO_WINDOWS_API and BOOST_CHRONO_MAC_API are defined
Chris@16 50 # elif defined( BOOST_CHRONO_MAC_API ) && defined( BOOST_CHRONO_POSIX_API )
Chris@16 51 # error both BOOST_CHRONO_MAC_API and BOOST_CHRONO_POSIX_API are defined
Chris@16 52 # elif !defined( BOOST_CHRONO_WINDOWS_API ) && !defined( BOOST_CHRONO_MAC_API ) && !defined( BOOST_CHRONO_POSIX_API )
Chris@16 53 # if (defined(_WIN32) || defined(__WIN32__) || defined(WIN32))
Chris@16 54 # define BOOST_CHRONO_WINDOWS_API
Chris@16 55 # elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
Chris@16 56 # define BOOST_CHRONO_MAC_API
Chris@16 57 # else
Chris@16 58 # define BOOST_CHRONO_POSIX_API
Chris@16 59 # endif
Chris@16 60 # endif
Chris@16 61
Chris@16 62 # if defined( BOOST_CHRONO_WINDOWS_API )
Chris@16 63 # ifndef UNDER_CE
Chris@16 64 # define BOOST_CHRONO_HAS_PROCESS_CLOCKS
Chris@16 65 # endif
Chris@16 66 # define BOOST_CHRONO_HAS_CLOCK_STEADY
Chris@16 67 # define BOOST_CHRONO_HAS_THREAD_CLOCK
Chris@16 68 # define BOOST_CHRONO_THREAD_CLOCK_IS_STEADY true
Chris@16 69 # endif
Chris@16 70
Chris@16 71 # if defined( BOOST_CHRONO_MAC_API )
Chris@16 72 # define BOOST_CHRONO_HAS_PROCESS_CLOCKS
Chris@16 73 # define BOOST_CHRONO_HAS_CLOCK_STEADY
Chris@16 74 # define BOOST_CHRONO_THREAD_CLOCK_IS_STEADY true
Chris@16 75 # endif
Chris@16 76
Chris@16 77 # if defined( BOOST_CHRONO_POSIX_API )
Chris@16 78 # define BOOST_CHRONO_HAS_PROCESS_CLOCKS
Chris@16 79 # include <time.h> //to check for CLOCK_REALTIME and CLOCK_MONOTONIC and _POSIX_THREAD_CPUTIME
Chris@16 80 # if defined(CLOCK_MONOTONIC)
Chris@16 81 # define BOOST_CHRONO_HAS_CLOCK_STEADY
Chris@16 82 # endif
Chris@16 83 # if defined(_POSIX_THREAD_CPUTIME) && !defined(BOOST_DISABLE_THREADS)
Chris@16 84 # define BOOST_CHRONO_HAS_THREAD_CLOCK
Chris@16 85 # define BOOST_CHRONO_THREAD_CLOCK_IS_STEADY true
Chris@16 86 # endif
Chris@16 87 # if defined(CLOCK_THREAD_CPUTIME_ID) && !defined(BOOST_DISABLE_THREADS)
Chris@16 88 # define BOOST_CHRONO_HAS_THREAD_CLOCK
Chris@16 89 # define BOOST_CHRONO_THREAD_CLOCK_IS_STEADY true
Chris@16 90 # endif
Chris@16 91 # if defined(sun) || defined(__sun)
Chris@16 92 # undef BOOST_CHRONO_HAS_THREAD_CLOCK
Chris@16 93 # undef BOOST_CHRONO_THREAD_CLOCK_IS_STEADY
Chris@16 94 # endif
Chris@16 95 # if defined(__HP_aCC) && defined(__hpux)
Chris@16 96 # undef BOOST_CHRONO_HAS_THREAD_CLOCK
Chris@16 97 # undef BOOST_CHRONO_THREAD_CLOCK_IS_STEADY
Chris@16 98 # endif
Chris@16 99 # if defined(__VXWORKS__)
Chris@16 100 # undef BOOST_CHRONO_HAS_PROCESS_CLOCKS
Chris@16 101 # endif
Chris@16 102 # endif
Chris@16 103
Chris@16 104 #if defined(BOOST_CHRONO_THREAD_DISABLED) && defined(BOOST_CHRONO_HAS_THREAD_CLOCK)
Chris@16 105 #undef BOOST_CHRONO_HAS_THREAD_CLOCK
Chris@16 106 #undef BOOST_CHRONO_THREAD_CLOCK_IS_STEADY
Chris@16 107 #endif
Chris@16 108
Chris@16 109 //#undef BOOST_CHRONO_HAS_PROCESS_CLOCKS
Chris@16 110
Chris@16 111 // unicode support ------------------------------//
Chris@16 112
Chris@16 113 #if defined(BOOST_NO_CXX11_UNICODE_LITERALS) || defined(BOOST_NO_CXX11_CHAR16_T) || defined(BOOST_NO_CXX11_CHAR32_T)
Chris@16 114 //~ #define BOOST_CHRONO_HAS_UNICODE_SUPPORT
Chris@16 115 #else
Chris@16 116 #define BOOST_CHRONO_HAS_UNICODE_SUPPORT 1
Chris@16 117 #endif
Chris@16 118
Chris@16 119 #if ! defined BOOST_NOEXCEPT
Chris@16 120 #if defined(BOOST_NO_CXX11_NOEXCEPT)
Chris@16 121 #define BOOST_NOEXCEPT
Chris@16 122 #else
Chris@16 123 #define BOOST_NOEXCEPT noexcept
Chris@16 124 #endif
Chris@16 125 #endif
Chris@16 126
Chris@16 127 #if defined( BOOST_NO_CXX11_NUMERIC_LIMITS )
Chris@16 128 #define BOOST_CHRONO_LIB_CONSTEXPR
Chris@16 129 #elif defined(_LIBCPP_VERSION) && !defined(_LIBCPP_CONSTEXPR)
Chris@16 130 #define BOOST_CHRONO_LIB_CONSTEXPR
Chris@16 131 #else
Chris@16 132 #define BOOST_CHRONO_LIB_CONSTEXPR BOOST_CONSTEXPR
Chris@16 133 #endif
Chris@16 134
Chris@16 135 #if defined( BOOST_NO_CXX11_NUMERIC_LIMITS )
Chris@16 136 # define BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW throw()
Chris@16 137 #else
Chris@16 138 #ifdef BOOST_NO_CXX11_NOEXCEPT
Chris@16 139 # define BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW throw()
Chris@16 140 #else
Chris@16 141 # define BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW noexcept
Chris@16 142 #endif
Chris@16 143 #endif
Chris@16 144
Chris@16 145
Chris@16 146 #if defined BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING \
Chris@16 147 && defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
Chris@16 148 #error "BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING && BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING defined"
Chris@16 149 #endif
Chris@16 150
Chris@16 151 #if defined BOOST_CHRONO_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0 \
Chris@16 152 && defined BOOST_CHRONO_DONT_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0
Chris@16 153 #error "BOOST_CHRONO_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0 && BOOST_CHRONO_DONT_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0 defined"
Chris@16 154 #endif
Chris@16 155
Chris@16 156 #if ! defined BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING \
Chris@16 157 && ! defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
Chris@16 158 #define BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING
Chris@16 159 #endif
Chris@16 160
Chris@16 161 #if (BOOST_CHRONO_VERSION == 2)
Chris@16 162 #if ! defined BOOST_CHRONO_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0 \
Chris@16 163 && ! defined BOOST_CHRONO_DONT_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0
Chris@16 164 #define BOOST_CHRONO_DONT_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0
Chris@16 165 #endif
Chris@16 166 #endif
Chris@16 167
Chris@16 168 #ifdef BOOST_CHRONO_HEADER_ONLY
Chris@16 169 #define BOOST_CHRONO_INLINE inline
Chris@16 170 #define BOOST_CHRONO_STATIC inline
Chris@16 171 #define BOOST_CHRONO_DECL
Chris@16 172
Chris@16 173 #else
Chris@16 174 #define BOOST_CHRONO_INLINE
Chris@16 175 #define BOOST_CHRONO_STATIC static
Chris@16 176
Chris@16 177 // enable dynamic linking on Windows ---------------------------------------//
Chris@16 178
Chris@16 179 // we need to import/export our code only if the user has specifically
Chris@16 180 // asked for it by defining either BOOST_ALL_DYN_LINK if they want all boost
Chris@16 181 // libraries to be dynamically linked, or BOOST_CHRONO_DYN_LINK
Chris@16 182 // if they want just this one to be dynamically liked:
Chris@16 183 #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_CHRONO_DYN_LINK)
Chris@16 184 // export if this is our own source, otherwise import:
Chris@16 185 #ifdef BOOST_CHRONO_SOURCE
Chris@16 186 # define BOOST_CHRONO_DECL BOOST_SYMBOL_EXPORT
Chris@16 187 #else
Chris@16 188 # define BOOST_CHRONO_DECL BOOST_SYMBOL_IMPORT
Chris@16 189 #endif // BOOST_CHRONO_SOURCE
Chris@16 190 #endif // DYN_LINK
Chris@16 191 //
Chris@16 192 // if BOOST_CHRONO_DECL isn't defined yet define it now:
Chris@16 193 #ifndef BOOST_CHRONO_DECL
Chris@16 194 #define BOOST_CHRONO_DECL
Chris@16 195 #endif
Chris@16 196
Chris@16 197
Chris@16 198
Chris@16 199 // enable automatic library variant selection ------------------------------//
Chris@16 200
Chris@16 201 #if !defined(BOOST_CHRONO_SOURCE) && !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_CHRONO_NO_LIB)
Chris@16 202 //
Chris@16 203 // Set the name of our library; this will get undef'ed by auto_link.hpp
Chris@16 204 // once it's done with it:
Chris@16 205 //
Chris@16 206 #define BOOST_LIB_NAME boost_chrono
Chris@16 207 //
Chris@16 208 // If we're importing code from a dll, then tell auto_link.hpp about it:
Chris@16 209 //
Chris@16 210 #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_CHRONO_DYN_LINK)
Chris@16 211 # define BOOST_DYN_LINK
Chris@16 212 #endif
Chris@16 213 //
Chris@16 214 // And include the header that does the work:
Chris@16 215 //
Chris@16 216 #include <boost/config/auto_link.hpp>
Chris@16 217 #endif // auto-linking disabled
Chris@16 218 #endif // BOOST_CHRONO_HEADER_ONLY
Chris@16 219 #endif // BOOST_CHRONO_CONFIG_HPP
Chris@16 220