RDKit
Open-source cheminformatics and machine learning.
RDExportMacros.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2021 Schrödinger, LLC
3 //
4 // @@ All Rights Reserved @@
5 // This file is part of the RDKit.
6 // The contents are covered by the terms of the BSD license
7 // which is included in the file license.txt, found at the root
8 // of the RDKit source tree.
9 //
10 
11 #pragma once
12 
13 #ifndef SWIG
14 #ifdef _MSC_VER
15 #pragma warning(disable : 4251)
16 #pragma warning(disable : 4275)
17 #endif
18 
19 #include <boost/config.hpp>
20 
21 // RDKit export macro definitions
22 #ifdef RDKIT_DYN_LINK
23 #if defined(WIN32) && defined(BOOST_HAS_DECLSPEC)
24 #define RDKIT_EXPORT_API __declspec(dllexport)
25 #define RDKIT_IMPORT_API __declspec(dllimport)
26 #elif __GNUC__ >= 4 || defined(__clang__)
27 #define RDKIT_EXPORT_API __attribute__((visibility("default")))
28 #define RDKIT_IMPORT_API __attribute__((visibility("default")))
29 #endif // WIN32
30 #endif // RDKIT_DYN_LINK
31 // RDKit end export macro definitions
32 
33 #endif // SWIG
34 
35 #ifndef RDKIT_EXPORT_API
36 #define RDKIT_EXPORT_API
37 #endif
38 #ifndef RDKIT_IMPORT_API
39 #define RDKIT_IMPORT_API
40 #endif