]> git.sesse.net Git - casparcg/blob - tbb30_20100406oss/include/tbb/_tbb_windef.h
2.0.2: Updated to boost 1.48.
[casparcg] / tbb30_20100406oss / include / tbb / _tbb_windef.h
1 /*
2     Copyright 2005-2010 Intel Corporation.  All Rights Reserved.
3
4     This file is part of Threading Building Blocks.
5
6     Threading Building Blocks is free software; you can redistribute it
7     and/or modify it under the terms of the GNU General Public License
8     version 2 as published by the Free Software Foundation.
9
10     Threading Building Blocks is distributed in the hope that it will be
11     useful, but WITHOUT ANY WARRANTY; without even the implied warranty
12     of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13     GNU General Public License for more details.
14
15     You should have received a copy of the GNU General Public License
16     along with Threading Building Blocks; if not, write to the Free Software
17     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
19     As a special exception, you may use this file as part of a free software
20     library without restriction.  Specifically, if other files instantiate
21     templates or use macros or inline functions from this file, or you compile
22     this file and link it with other files to produce an executable, this
23     file does not by itself cause the resulting executable to be covered by
24     the GNU General Public License.  This exception does not however
25     invalidate any other reasons why the executable file might be covered by
26     the GNU General Public License.
27 */
28
29 #ifndef __TBB_tbb_windef_H
30 #error Do not #include this file directly.  Use "#include tbb/tbb_stddef.h" instead.
31 #endif /* __TBB_tbb_windef_H */
32
33 // Check that the target Windows version has all API calls requried for TBB.
34 // Do not increase the version in condition beyond 0x0500 without prior discussion!
35 #if defined(_WIN32_WINNT) && _WIN32_WINNT<0x0400
36 #error TBB is unable to run on old Windows versions; _WIN32_WINNT must be 0x0400 or greater.
37 #endif
38
39 #if !defined(_MT)
40 #error TBB requires linkage with multithreaded C/C++ runtime library. \
41        Choose multithreaded DLL runtime in project settings, or use /MD[d] compiler switch.
42 #endif
43
44 // Workaround for the problem with MVSC headers failing to define namespace std
45 namespace std {
46   using ::size_t; using ::ptrdiff_t;
47 }
48
49 #define __TBB_STRING_AUX(x) #x
50 #define __TBB_STRING(x) __TBB_STRING_AUX(x)
51
52 // Default setting of TBB_USE_DEBUG
53 #ifdef TBB_USE_DEBUG
54 #    if TBB_USE_DEBUG 
55 #        if !defined(_DEBUG)
56 #            pragma message(__FILE__ "(" __TBB_STRING(__LINE__) ") : Warning: Recommend using /MDd if compiling with TBB_USE_DEBUG!=0")
57 #        endif
58 #    else
59 #        if defined(_DEBUG)
60 #            pragma message(__FILE__ "(" __TBB_STRING(__LINE__) ") : Warning: Recommend using /MD if compiling with TBB_USE_DEBUG==0")
61 #        endif
62 #    endif
63 #else
64 #    ifdef _DEBUG
65 #        define TBB_USE_DEBUG 1
66 #    endif
67 #endif 
68
69 #if __TBB_BUILD && !defined(__TBB_NO_IMPLICIT_LINKAGE)
70 #define __TBB_NO_IMPLICIT_LINKAGE 1
71 #endif
72
73 #if _MSC_VER
74     #if !__TBB_NO_IMPLICIT_LINKAGE
75         #ifdef _DEBUG
76             #pragma comment(lib, "tbb_debug.lib")
77         #else
78             #pragma comment(lib, "tbb.lib")
79         #endif
80     #endif
81 #endif