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