blob: be04a8e0a825c25eb715c12d9322487702eddee5 [file] [log] [blame]
Jeff Thompsonf7d49942013-08-01 16:47:40 -07001// (C) Copyright John Maddock 2003.
2// Use, modification and distribution are subject to the
3// Boost Software License, Version 1.0. (See accompanying file
4// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5
6
7#ifndef BOOST_CONFIG_REQUIRES_THREADS_HPP
8#define BOOST_CONFIG_REQUIRES_THREADS_HPP
9
10#ifndef BOOST_CONFIG_HPP
Jeff Thompson2277ce52013-08-01 17:34:11 -070011# include <ndnboost/config.hpp>
Jeff Thompsonf7d49942013-08-01 16:47:40 -070012#endif
13
14#if defined(BOOST_DISABLE_THREADS)
15
16//
17// special case to handle versions of gcc which don't currently support threads:
18//
19#if defined(__GNUC__) && ((__GNUC__ < 3) || (__GNUC_MINOR__ <= 3) || !defined(BOOST_STRICT_CONFIG))
20//
21// this is checked up to gcc 3.3:
22//
23#if defined(__sgi) || defined(__hpux)
24# error "Multi-threaded programs are not supported by gcc on HPUX or Irix (last checked with gcc 3.3)"
25#endif
26
27#endif
28
29# error "Threading support unavaliable: it has been explicitly disabled with BOOST_DISABLE_THREADS"
30
31#elif !defined(BOOST_HAS_THREADS)
32
33# if defined __COMO__
34// Comeau C++
35# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -D_MT (Windows) or -D_REENTRANT (Unix)"
36
37#elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)
38// Intel
39#ifdef _WIN32
40# error "Compiler threading support is not turned on. Please set the correct command line options for threading: either /MT /MTd /MD or /MDd"
41#else
42# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -openmp"
43#endif
44
45# elif defined __GNUC__
46// GNU C++:
47# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -pthread (Linux), -pthreads (Solaris) or -mthreads (Mingw32)"
48
49#elif defined __sgi
50// SGI MIPSpro C++
51# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -D_SGI_MP_SOURCE"
52
53#elif defined __DECCXX
54// Compaq Tru64 Unix cxx
55# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -pthread"
56
57#elif defined __BORLANDC__
58// Borland
59# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -tWM"
60
61#elif defined __MWERKS__
62// Metrowerks CodeWarrior
63# error "Compiler threading support is not turned on. Please set the correct command line options for threading: either -runtime sm, -runtime smd, -runtime dm, or -runtime dmd"
64
65#elif defined __SUNPRO_CC
66// Sun Workshop Compiler C++
67# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -mt"
68
69#elif defined __HP_aCC
70// HP aCC
71# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -mt"
72
73#elif defined(__IBMCPP__)
74// IBM Visual Age
75# error "Compiler threading support is not turned on. Please compile the code with the xlC_r compiler"
76
77#elif defined _MSC_VER
78// Microsoft Visual C++
79//
80// Must remain the last #elif since some other vendors (Metrowerks, for
81// example) also #define _MSC_VER
82# error "Compiler threading support is not turned on. Please set the correct command line options for threading: either /MT /MTd /MD or /MDd"
83
84#else
85
86# error "Compiler threading support is not turned on. Please consult your compiler's documentation for the appropriate options to use"
87
88#endif // compilers
89
90#endif // BOOST_HAS_THREADS
91
92#endif // BOOST_CONFIG_REQUIRES_THREADS_HPP