1 // (C) Copyright John Maddock 2003.
\r
2 // Use, modification and distribution are subject to the
\r
3 // Boost Software License, Version 1.0. (See accompanying file
\r
4 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
\r
7 #ifndef BOOST_CONFIG_REQUIRES_THREADS_HPP
\r
8 #define BOOST_CONFIG_REQUIRES_THREADS_HPP
\r
10 #ifndef BOOST_CONFIG_HPP
\r
11 # include <boost/config.hpp>
\r
14 #if defined(BOOST_DISABLE_THREADS)
\r
17 // special case to handle versions of gcc which don't currently support threads:
\r
19 #if defined(__GNUC__) && ((__GNUC__ < 3) || (__GNUC_MINOR__ <= 3) || !defined(BOOST_STRICT_CONFIG))
\r
21 // this is checked up to gcc 3.3:
\r
23 #if defined(__sgi) || defined(__hpux)
\r
24 # error "Multi-threaded programs are not supported by gcc on HPUX or Irix (last checked with gcc 3.3)"
\r
29 # error "Threading support unavaliable: it has been explicitly disabled with BOOST_DISABLE_THREADS"
\r
31 #elif !defined(BOOST_HAS_THREADS)
\r
33 # if defined __COMO__
\r
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)"
\r
37 #elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)
\r
40 # error "Compiler threading support is not turned on. Please set the correct command line options for threading: either /MT /MTd /MD or /MDd"
\r
42 # error "Compiler threading support is not turned on. Please set the correct command line options for threading: -openmp"
\r
45 # elif defined __GNUC__
\r
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)"
\r
51 # error "Compiler threading support is not turned on. Please set the correct command line options for threading: -D_SGI_MP_SOURCE"
\r
53 #elif defined __DECCXX
\r
54 // Compaq Tru64 Unix cxx
\r
55 # error "Compiler threading support is not turned on. Please set the correct command line options for threading: -pthread"
\r
57 #elif defined __BORLANDC__
\r
59 # error "Compiler threading support is not turned on. Please set the correct command line options for threading: -tWM"
\r
61 #elif defined __MWERKS__
\r
62 // Metrowerks CodeWarrior
\r
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"
\r
65 #elif defined __SUNPRO_CC
\r
66 // Sun Workshop Compiler C++
\r
67 # error "Compiler threading support is not turned on. Please set the correct command line options for threading: -mt"
\r
69 #elif defined __HP_aCC
\r
71 # error "Compiler threading support is not turned on. Please set the correct command line options for threading: -mt"
\r
73 #elif defined(__IBMCPP__)
\r
75 # error "Compiler threading support is not turned on. Please compile the code with the xlC_r compiler"
\r
77 #elif defined _MSC_VER
\r
78 // Microsoft Visual C++
\r
80 // Must remain the last #elif since some other vendors (Metrowerks, for
\r
81 // example) also #define _MSC_VER
\r
82 # error "Compiler threading support is not turned on. Please set the correct command line options for threading: either /MT /MTd /MD or /MDd"
\r
86 # error "Compiler threading support is not turned on. Please consult your compiler's documentation for the appropriate options to use"
\r
90 #endif // BOOST_HAS_THREADS
\r
92 #endif // BOOST_CONFIG_REQUIRES_THREADS_HPP
\r