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