Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
_tbb_windef.h
Go to the documentation of this file.
1 /*
2  Copyright (c) 2005-2019 Intel Corporation
3 
4  Licensed under the Apache License, Version 2.0 (the "License");
5  you may not use this file except in compliance with the License.
6  You may obtain a copy of the License at
7 
8  http://www.apache.org/licenses/LICENSE-2.0
9 
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15 
16 
17 
18 
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

Copyright © 2005-2019 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

* Other names and brands may be claimed as the property of others.