annotate DEPENDENCIES/generic/include/boost/chrono/config.hpp @ 133:4acb5d8d80b6 tip

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