HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OpenEXRConfig.h
Go to the documentation of this file.
1 // SPDX-License-Identifier: BSD-3-Clause
2 // Copyright (c) Contributors to the OpenEXR Project.
3 
4 // This file is auto-generated by the configure step
5 
6 #ifndef INCLUDED_OPENEXR_CONFIG_H
7 #define INCLUDED_OPENEXR_CONFIG_H 1
8 
9 #pragma once
10 
11 //
12 // The OpenEXR release version is defined officially in
13 // src/lib/OpenEXRCore/openexr_version.h, but CMake doesn't readily allow
14 // that to be included here, so duplicate the settings for
15 // backwards-compatibility with applications that may expect to get the
16 // defines from this include.
17 //
18 
19 #ifndef INCLUDED_OPENEXR_VERSION_H
20 #define OPENEXR_VERSION_MAJOR 3
21 #define OPENEXR_VERSION_MINOR 2
22 #define OPENEXR_VERSION_PATCH 1
23 #endif
24 
25 //
26 // Options / configuration based on O.S. / compiler
27 /////////////////////
28 
29 // automated formatting does not handle the cmake tags well
30 // clang-format off
31 
32 //
33 // Define and set to 1 if the target system has support for large
34 // stack sizes.
35 //
36 /* #undef OPENEXR_HAVE_LARGE_STACK */
37 
38 //////////////////////
39 //
40 // C++ namespace configuration / options
41 
42 //
43 // Current internal library namespace name
44 //
45 #define OPENEXR_IMF_INTERNAL_NAMESPACE_CUSTOM 1
46 #define OPENEXR_IMF_INTERNAL_NAMESPACE Imf_3_2_sidefx
47 
48 //
49 // Current public user namespace name
50 //
51 
52 #define OPENEXR_IMF_NAMESPACE_CUSTOM 1
53 #define OPENEXR_IMF_NAMESPACE Imf
54 
55 //
56 // Version string for runtime access
57 //
58 
59 #define OPENEXR_VERSION_STRING "3.2.1"
60 #define OPENEXR_PACKAGE_STRING "OpenEXR 3.2.1"
61 
62 #define OPENEXR_VERSION_RELEASE_TYPE ""
63 // Deprecated, for back compatibility:
64 #define OPENEXR_VERSION_EXTRA ""
65 
66 #define OPENEXR_LIB_VERSION_STRING "31.3.2.1"
67 
68 // clang-format on
69 
70 // Version as a single hex number, e.g. 0x01000300 == 1.0.3
71 #define OPENEXR_VERSION_HEX \
72  (((OPENEXR_VERSION_MAJOR) << 24) | \
73  ((OPENEXR_VERSION_MINOR) << 16) | \
74  ((OPENEXR_VERSION_PATCH) << 8))
75 
76 // On modern versions of gcc & clang, __has_attribute can test support for
77 // __attribute__((attr)). Make sure it's safe for other compilers.
78 #ifndef __has_attribute
79 # define __has_attribute(x) 0
80 #endif
81 
82 // Whether the user configured the library to have symbol visibility
83 // tagged
84 #define OPENEXR_ENABLE_API_VISIBILITY
85 
86 /// \defgroup ExportMacros Macros to manage symbol visibility
87 ///
88 /// See website/SymbolVisibility.rst for more discussion about the
89 /// motivation for these macros
90 ///
91 /// If we are compiling a DLL for Windows, there needs to be custom
92 /// rules for each library such that the macro swaps between doing a
93 /// dllexport and a dllimport, so the defines here are less
94 /// useful. Further, MSVC does not have this concept at all currently,
95 /// so is elided.
96 ///
97 /// The top level macros which start with OPENEXR can act as simple
98 /// ways to combine the logic however for non-DLL or non-windows
99 /// platforms, but until the current patterns change, one should check
100 /// the specific library export.h (i.e. @sa IexExport.h,
101 /// @sa IlmThreadExport.h, @sa ImfExport.h, @sa ImfUtilExport.h )
102 ///
103 /// These per-library exports define a subset which are used by that
104 /// library.
105 ///
106 /// Iex is simple and does not need to do more than expose class types
107 /// and functions, and does not have any private members to hide, so
108 /// only provides a couple of the possible macros.
109 ///
110 /// Similarly, IlmThread is also reasonably simple.
111 ///
112 /// OpenEXR and OpenEXRUtil have much more logic and have to deal with
113 /// templates and template instantiation, and so define more of the
114 /// macros.
115 ///
116 /// @{
117 
118 #if defined(OPENEXR_ENABLE_API_VISIBILITY) && \
119  !(defined(OPENEXR_DLL) || defined(_MSC_VER))
120 # define OPENEXR_PUBLIC_SYMBOL_ATTRIBUTE \
121  __attribute__ ((__visibility__ ("default")))
122 # define OPENEXR_PRIVATE_SYMBOL_ATTRIBUTE \
123  __attribute__ ((__visibility__ ("hidden")))
124 // clang differs from gcc and has type visibility which is needed
125 // for enums and templates, and isn't well documented, but causes
126 // the vtable and typeinfo to be made visible, but not necessarily
127 // all the members
128 # if __has_attribute(__type_visibility__)
129 # define OPENEXR_PUBLIC_TYPE_VISIBILITY_ATTRIBUTE \
130  __attribute__ ((__type_visibility__ ("default")))
131 # endif
132 
133 // these are always the same, at least in current compilers
134 # define OPENEXR_EXPORT OPENEXR_PUBLIC_SYMBOL_ATTRIBUTE
135 # define OPENEXR_HIDDEN OPENEXR_PRIVATE_SYMBOL_ATTRIBUTE
136 // currently define this as the same between compilers to export
137 // things like default copy ctors etc, and do not use the type
138 // visibility which only exports the typeinfo / vtable
139 # define OPENEXR_EXPORT_TYPE OPENEXR_EXPORT
140 # define OPENEXR_EXPORT_EXTERN_TEMPLATE OPENEXR_EXPORT
141 
142 # ifdef OPENEXR_PUBLIC_TYPE_VISIBILITY_ATTRIBUTE
143 # define OPENEXR_EXPORT_ENUM OPENEXR_PUBLIC_TYPE_VISIBILITY_ATTRIBUTE
144 # define OPENEXR_EXPORT_TEMPLATE_TYPE \
145  OPENEXR_PUBLIC_TYPE_VISIBILITY_ATTRIBUTE
146 // clang (well, type_visibility) seems empirically need the
147 // default/public symbol tag when specifying explicit template
148 // instantiations, where gcc (no type_visibility) complains if
149 // you set that
150 # define OPENEXR_EXPORT_TEMPLATE_INSTANCE OPENEXR_EXPORT
151 # else
152 # define OPENEXR_EXPORT_ENUM
153 # define OPENEXR_EXPORT_TEMPLATE_TYPE OPENEXR_EXPORT
154 # define OPENEXR_EXPORT_TEMPLATE_INSTANCE
155 # endif
156 
157 #else // msvc or api visibility disabled, just clear all this out (DLLs will define a set anyway)
158 
159 # define OPENEXR_EXPORT
160 # define OPENEXR_HIDDEN
161 # define OPENEXR_EXPORT_TYPE
162 # define OPENEXR_EXPORT_EXTERN_TEMPLATE
163 # define OPENEXR_EXPORT_ENUM
164 # define OPENEXR_EXPORT_TEMPLATE_TYPE
165 # define OPENEXR_EXPORT_TYPE
166 # define OPENEXR_EXPORT_TEMPLATE_INSTANCE
167 
168 #endif
169 
170 #if defined(__cplusplus) && (__cplusplus >= 201402L)
171 # define OPENEXR_DEPRECATED(msg) [[deprecated (msg)]]
172 #endif
173 
174 #ifndef OPENEXR_DEPRECATED
175 # ifdef _MSC_VER
176 # define OPENEXR_DEPRECATED(msg) __declspec(deprecated (msg))
177 # else
178 # define OPENEXR_DEPRECATED(msg) __attribute__ ((deprecated (msg)))
179 # endif
180 #endif
181 
182 #endif // INCLUDED_OPENEXR_CONFIG_H