Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
tbb_version.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 // Please define version number in the file:
22 #include "tbb/tbb_stddef.h"
23 
24 // And don't touch anything below
25 #ifndef ENDL
26 #define ENDL "\n"
27 #endif
28 #include "version_string.ver"
29 
30 #ifndef __TBB_VERSION_STRINGS
31 #pragma message("Warning: version_string.ver isn't generated properly by version_info.sh script!")
32 // here is an example of macros value:
33 #define __TBB_VERSION_STRINGS \
34 "TBB: BUILD_HOST\tUnknown\n" \
35 "TBB: BUILD_ARCH\tUnknown\n" \
36 "TBB: BUILD_OS\t\tUnknown\n" \
37 "TBB: BUILD_CL\t\tUnknown\n" \
38 "TBB: BUILD_COMPILER\tUnknown\n" \
39 "TBB: BUILD_COMMAND\tUnknown\n"
40 #endif
41 #ifndef __TBB_DATETIME
42 #ifdef RC_INVOKED
43 #define __TBB_DATETIME "Unknown"
44 #else
45 #define __TBB_DATETIME __DATE__ __TIME__
46 #endif
47 #endif
48 
49 #define __TBB_VERSION_NUMBER(N) #N ": VERSION\t\t" __TBB_STRING(TBB_VERSION_MAJOR.TBB_VERSION_MINOR) ENDL
50 #define __TBB_INTERFACE_VERSION_NUMBER(N) #N ": INTERFACE VERSION\t" __TBB_STRING(TBB_INTERFACE_VERSION) ENDL
51 
52 #define __TBB_VERSION_DATETIME(N) #N ": BUILD_DATE\t\t" __TBB_DATETIME ENDL
53 #ifndef TBB_USE_DEBUG
54  #define __TBB_VERSION_USE_DEBUG(N) #N ": TBB_USE_DEBUG\tundefined" ENDL
55 #elif TBB_USE_DEBUG==0
56  #define __TBB_VERSION_USE_DEBUG(N) #N ": TBB_USE_DEBUG\t0" ENDL
57 #elif TBB_USE_DEBUG==1
58  #define __TBB_VERSION_USE_DEBUG(N) #N ": TBB_USE_DEBUG\t1" ENDL
59 #elif TBB_USE_DEBUG==2
60  #define __TBB_VERSION_USE_DEBUG(N) #N ": TBB_USE_DEBUG\t2" ENDL
61 #else
62  #error Unexpected value for TBB_USE_DEBUG
63 #endif
64 
65 /* Make __TBB_VERSION_USE_ASSERT and __TBB_VERSION_DO_NOTIFY empty for rc
66  * because rc from VS2005 crashed with fatal error RC10056 for too complex
67  * macros (for example, when __TBB_CPF_BUILD is enabled).
68  * All information is available in BUILD_COMMAND anyway.
69  */
70 
71 #ifdef RC_INVOKED
72  #define __TBB_VERSION_USE_ASSERT(N)
73 #else // RC_INVOKED
74 #ifndef TBB_USE_ASSERT
75  #define __TBB_VERSION_USE_ASSERT(N) #N ": TBB_USE_ASSERT\tundefined" ENDL
76 #elif TBB_USE_ASSERT==0
77  #define __TBB_VERSION_USE_ASSERT(N) #N ": TBB_USE_ASSERT\t0" ENDL
78 #elif TBB_USE_ASSERT==1
79  #define __TBB_VERSION_USE_ASSERT(N) #N ": TBB_USE_ASSERT\t1" ENDL
80 #elif TBB_USE_ASSERT==2
81  #define __TBB_VERSION_USE_ASSERT(N) #N ": TBB_USE_ASSERT\t2" ENDL
82 #else
83  #error Unexpected value for TBB_USE_ASSERT
84 #endif
85 #endif // RC_INVOKED
86 
87 #ifndef __TBB_CPF_BUILD
88  #define __TBB_VERSION_TBB_PREVIEW_BINARY(N)
89 #else
90  #define __TBB_VERSION_TBB_PREVIEW_BINARY(N) #N ": TBB_PREVIEW_BINARY\t1" ENDL
91 #endif
92 
93 #ifdef RC_INVOKED
94  #define __TBB_VERSION_DO_NOTIFY(N)
95 #else
96 #ifndef DO_ITT_NOTIFY
97  #define __TBB_VERSION_DO_NOTIFY(N) #N ": DO_ITT_NOTIFY\tundefined" ENDL
98 #elif DO_ITT_NOTIFY==1
99  #define __TBB_VERSION_DO_NOTIFY(N) #N ": DO_ITT_NOTIFY\t1" ENDL
100 #elif DO_ITT_NOTIFY==0
101  #define __TBB_VERSION_DO_NOTIFY(N)
102 #else
103  #error Unexpected value for DO_ITT_NOTIFY
104 #endif
105 #endif // RC_INVOKED
106 
107 #define TBB_VERSION_STRINGS_P(N) __TBB_VERSION_NUMBER(N) __TBB_INTERFACE_VERSION_NUMBER(N) __TBB_VERSION_DATETIME(N) __TBB_VERSION_STRINGS(N) __TBB_VERSION_USE_DEBUG(N) __TBB_VERSION_USE_ASSERT(N) __TBB_VERSION_TBB_PREVIEW_BINARY(N) __TBB_VERSION_DO_NOTIFY(N)
108 
109 #define TBB_VERSION_STRINGS TBB_VERSION_STRINGS_P(TBB)
110 #define TBBMALLOC_VERSION_STRINGS TBB_VERSION_STRINGS_P(TBBmalloc)
111 
112 // numbers
113 #ifndef __TBB_VERSION_YMD
114 #define __TBB_VERSION_YMD 0, 0
115 #endif
116 
117 #define TBB_VERNUMBERS TBB_VERSION_MAJOR, TBB_VERSION_MINOR, __TBB_VERSION_YMD
118 
119 #define TBB_VERSION __TBB_STRING(TBB_VERNUMBERS)

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.