1 // (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)
7 #ifndef BOOST_CONFIG_REQUIRES_THREADS_HPP
8 #define BOOST_CONFIG_REQUIRES_THREADS_HPP
10 #ifndef BOOST_CONFIG_HPP
11 # include <boost/config.hpp>
14 #if defined(BOOST_DISABLE_THREADS)
17 // special case to handle versions of gcc which don't currently support threads:
19 #if defined(__GNUC__) && ((__GNUC__ < 3) || (__GNUC_MINOR__ <= 3) || !defined(BOOST_STRICT_CONFIG))
21 // this is checked up to gcc 3.3:
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)"
29 # error "Threading support unavaliable: it has been explicitly disabled with BOOST_DISABLE_THREADS"
31 #elif !defined(BOOST_HAS_THREADS)
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)"
37 #elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)
40 # error "Compiler threading support is not turned on. Please set the correct command line options for threading: either /MT /MTd /MD or /MDd"
42 # error "Compiler threading support is not turned on. Please set the correct command line options for threading: -openmp"
45 # elif defined __GNUC__
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)"
51 # error "Compiler threading support is not turned on. Please set the correct command line options for threading: -D_SGI_MP_SOURCE"
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"
57 #elif defined __BORLANDC__
59 # error "Compiler threading support is not turned on. Please set the correct command line options for threading: -tWM"
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"
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"
69 #elif defined __HP_aCC
71 # error "Compiler threading support is not turned on. Please set the correct command line options for threading: -mt"
73 #elif defined(__IBMCPP__)
75 # error "Compiler threading support is not turned on. Please compile the code with the xlC_r compiler"
77 #elif defined _MSC_VER
78 // Microsoft Visual C++
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"
86 # error "Compiler threading support is not turned on. Please consult your compiler's documentation for the appropriate options to use"
90 #endif // BOOST_HAS_THREADS
92 #endif // BOOST_CONFIG_REQUIRES_THREADS_HPP