conduit_exports.h
Go to the documentation of this file.
1 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
2 // Copyright (c) 2014-2019, Lawrence Livermore National Security, LLC.
3 //
4 // Produced at the Lawrence Livermore National Laboratory
5 //
6 // LLNL-CODE-666778
7 //
8 // All rights reserved.
9 //
10 // This file is part of Conduit.
11 //
12 // For details, see: http://software.llnl.gov/conduit/.
13 //
14 // Please also read conduit/LICENSE
15 //
16 // Redistribution and use in source and binary forms, with or without
17 // modification, are permitted provided that the following conditions are met:
18 //
19 // * Redistributions of source code must retain the above copyright notice,
20 // this list of conditions and the disclaimer below.
21 //
22 // * Redistributions in binary form must reproduce the above copyright notice,
23 // this list of conditions and the disclaimer (as noted below) in the
24 // documentation and/or other materials provided with the distribution.
25 //
26 // * Neither the name of the LLNS/LLNL nor the names of its contributors may
27 // be used to endorse or promote products derived from this software without
28 // specific prior written permission.
29 //
30 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
31 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
32 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
33 // ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY,
34 // LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY
35 // DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 // IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 // POSSIBILITY OF SUCH DAMAGE.
42 //
43 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
44 
45 //-----------------------------------------------------------------------------
49 //-----------------------------------------------------------------------------
50 
51 //-----------------------------------------------------------------------------
52 #ifndef CONDUIT_EXPORTS_H
53 #define CONDUIT_EXPORTS_H
54 //-----------------------------------------------------------------------------
55 
56 //-----------------------------------------------------------------------------
57 // -- define proper lib exports for various platforms --
58 //-----------------------------------------------------------------------------
59 
60 // xxx(kitware) keep all CONDUIT_API hidden.
61 //
62 /* #undef CONDUIT_WINDOWS_DLL_EXPORTS */
63 //#if defined(CONDUIT_EXPORTS) || defined(conduit_EXPORTS)
64 // /* define catch all def */
65 // #define CONDUIT_EXPORTS_DEFINED 1
66 //#endif
67 
68 #if defined(_WIN32)
69  #if defined(CONDUIT_WINDOWS_DLL_EXPORTS)
70  #if defined(CONDUIT_EXPORTS_DEFINED)
71  #define CONDUIT_API __declspec(dllexport)
72  #else
73  #define CONDUIT_API __declspec(dllimport)
74  #endif
75  #else
76  #define CONDUIT_API /* empty for static builds */
77  #endif
78 
79  #if defined(_MSC_VER)
80  /* Turn off warning about lack of DLL interface */
81  #pragma warning(disable:4251)
82  /* Turn off warning non-dll class is base for dll-interface class */
83  #pragma warning(disable:4275)
84  /* Turn off warning about identifier truncation */
85  #pragma warning(disable:4786)
86  #endif
87 #else
88  #if __GNUC__ >= 4 && defined(CONDUIT_EXPORTS_DEFINED)
89  #define CONDUIT_API __attribute__ ((visibility("default")))
90  #else
91  #define CONDUIT_API __attribute__ ((visibility("hidden")))
92  #endif
93 #endif
94 
95 //-----------------------------------------------------------------------------
96 // CONDUIT_EXPORTS_H
97 //-----------------------------------------------------------------------------
98 #endif
99 
100 
101 
102