VTKmExportHeaderTemplate.h.in 3.08 KB
Newer Older
1 2 3 4 5 6 7 8 9 10
//=============================================================================
//
//  Copyright (c) Kitware, Inc.
//  All rights reserved.
//  See LICENSE.txt for details.
//
//  This software is distributed WITHOUT ANY WARRANTY; without even
//  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
//  PURPOSE.  See the above copyright notice for more information.
//
11
//  Copyright 2016 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
12 13 14
//  Copyright 2016 UT-Battelle, LLC.
//  Copyright 2016 Los Alamos National Security.
//
15
//  Under the terms of Contract DE-NA0003525 with NTESS,
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
//  the U.S. Government retains certain rights in this software.
//  Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National
//  Laboratory (LANL), the U.S. Government retains certain rights in
//  this software.
//
//=============================================================================
#ifndef @EXPORT_MACRO_NAME@_EXPORT_H
#define @EXPORT_MACRO_NAME@_EXPORT_H

#if defined(_MSC_VER)
# if @EXPORT_IS_BUILT_STATIC@
    /* This is a static component and has no need for exports
       elf based static libraries are able to have hidden/default visibility
       controls on symbols so we should propagate this information in that
       use case
    */
#   define @EXPORT_MACRO_NAME@_EXPORT_DEFINE
#   define @EXPORT_MACRO_NAME@_IMPORT_DEFINE
#   define @EXPORT_MACRO_NAME@_NO_EXPORT_DEFINE
# else
#   define @EXPORT_MACRO_NAME@_EXPORT_DEFINE __declspec(dllexport)
#   define @EXPORT_MACRO_NAME@_IMPORT_DEFINE __declspec(dllimport)
#   define @EXPORT_MACRO_NAME@_NO_EXPORT_DEFINE
# endif
#else
#   define @EXPORT_MACRO_NAME@_EXPORT_DEFINE __attribute__((visibility("default")))
#   define @EXPORT_MACRO_NAME@_IMPORT_DEFINE __attribute__((visibility("default")))
#   define @EXPORT_MACRO_NAME@_NO_EXPORT_DEFINE __attribute__((visibility("hidden")))
#endif

#ifndef @EXPORT_MACRO_NAME@_EXPORT
# if defined(@EXPORT_IMPORT_CONDITION@)
    /* We are building this library */
#   define @EXPORT_MACRO_NAME@_EXPORT @EXPORT_MACRO_NAME@_EXPORT_DEFINE
# else
    /* We are using this library */
#   define @EXPORT_MACRO_NAME@_EXPORT @EXPORT_MACRO_NAME@_IMPORT_DEFINE
# endif
#endif

#ifndef @EXPORT_MACRO_NAME@_TEMPLATE_EXPORT
# if defined(@EXPORT_IMPORT_CONDITION@) && defined(_MSC_VER)
  /* Warning C4910 on windows state that extern explicit template can't be
     labeled with __declspec(dllexport). So that is why we use a new custom
     define. But when other modules ( e.g. rendering ) include this header
     we need them to see that the extern template is actually being imported.
  */
    /* We are building this library with MSVC */
#   define @EXPORT_MACRO_NAME@_TEMPLATE_EXPORT
# elif defined(@EXPORT_IMPORT_CONDITION@)
    /* We are building this library */
#   define @EXPORT_MACRO_NAME@_TEMPLATE_EXPORT @EXPORT_MACRO_NAME@_EXPORT_DEFINE
# else
    /* We are using this library */
#   define @EXPORT_MACRO_NAME@_TEMPLATE_EXPORT @EXPORT_MACRO_NAME@_IMPORT_DEFINE
# endif
#endif

#ifndef @EXPORT_MACRO_NAME@_NO_EXPORT
  #define @EXPORT_MACRO_NAME@_NO_EXPORT @EXPORT_MACRO_NAME@_NO_EXPORT_DEFINE
#endif

#endif