Dune Core Modules (2.9.0)

visibility.hh
Go to the documentation of this file.
1 // -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 // vi: set et ts=4 sw=2 sts=2:
3 // SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
4 // SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
5 #ifndef DUNE_COMMON_VISIBILITY_HH
6 #define DUNE_COMMON_VISIBILITY_HH
7 
12 #ifdef DOXYGEN
13 
15 
20 #define DUNE_EXPORT implementation_defined
21 
23 
28 #define DUNE_PRIVATE implementation_defined
29 
30 #else // DOXYGEN
31 
32 #if __GNUC__ >= 4
33 // GCC and Clang both define __GNUC__ to 4 and they both support the visibility
34 // attribute
35 #define DUNE_EXPORT __attribute__((visibility("default")))
36 #define DUNE_PRIVATE __attribute__((visibility("hidden")))
37 #else
38 // We don't know about the active compiler, so just turn the visibility macros to no-ops.
39 #define DUNE_EXPORT
40 #define DUNE_PRIVATE
41 #endif
42 
43 #endif // DOXYGEN
44 
45 #endif // DUNE_COMMON_VISIBILITY
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.80.0 (May 1, 22:29, 2024)