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