HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
IlmThreadExport.h
Go to the documentation of this file.
1 //
2 // SPDX-License-Identifier: BSD-3-Clause
3 // Copyright (c) Contributors to the OpenEXR Project.
4 //
5 
6 #ifndef INCLUDED_ILMTHREADEXPORT_H
7 #define INCLUDED_ILMTHREADEXPORT_H
8 
9 #include "OpenEXRConfig.h"
10 
11 // See website/SymbolVisibility.rst for more discussion
12 
13 /// \addtogroup ExportMacros
14 /// @{
15 
16 // are we making a DLL under windows (might be msvc or mingw or others)
17 #if defined(OPENEXR_DLL)
18 
19 // when building as a DLL for windows, typical dllexport / import case
20 // where we need to switch depending on whether we are compiling
21 // internally or not
22 # if defined(ILMTHREAD_EXPORTS)
23 # define ILMTHREAD_EXPORT __declspec(dllexport)
24 # else
25 # define ILMTHREAD_EXPORT __declspec(dllimport)
26 # endif
27 
28 // DLLs don't support these types of visibility controls, just leave them as empty
29 # define ILMTHREAD_EXPORT_TYPE
30 # define ILMTHREAD_HIDDEN
31 
32 #else // OPENEXR_DLL
33 
34 // just pass these through from the top level config
35 # define ILMTHREAD_EXPORT OPENEXR_EXPORT
36 # define ILMTHREAD_HIDDEN OPENEXR_HIDDEN
37 # define ILMTHREAD_EXPORT_TYPE OPENEXR_EXPORT_TYPE
38 
39 #endif // OPENEXR_DLL
40 
41 /// @}
42 
43 #endif // INCLUDED_ILMTHREADEXPORT_H