Skip to content

Commit

Permalink
config.hh: Use c++11 attribute when C++11 is activated
Browse files Browse the repository at this point in the history
  • Loading branch information
jorisv committed Oct 31, 2024
1 parent 4161df0 commit 52070f7
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions config.hh.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,23 @@
# else
// On Linux, for GCC >= 4, tag symbols using GCC extension.
# if __GNUC__ >= 4
# define @LIBRARY_NAME@_DLLIMPORT __attribute__ ((visibility("default")))
# define @LIBRARY_NAME@_DLLEXPORT __attribute__ ((visibility("default")))
# define @LIBRARY_NAME@_DLLLOCAL __attribute__ ((visibility("hidden")))
# define @LIBRARY_NAME@_EXPLICIT_INSTANTIATION_DECLARATION_DLLIMPORT __attribute__ ((visibility("default")))
# define @LIBRARY_NAME@_EXPLICIT_INSTANTIATION_DECLARATION_DLLEXPORT __attribute__ ((visibility("default")))
# define @LIBRARY_NAME@_EXPLICIT_INSTANTIATION_DEFINITION_DLLIMPORT
# define @LIBRARY_NAME@_EXPLICIT_INSTANTIATION_DEFINITION_DLLEXPORT
# if defined(__cplusplus) && (__cplusplus >= 201103L)
# define @LIBRARY_NAME@_DLLIMPORT [[gnu::visibility("default")]]
# define @LIBRARY_NAME@_DLLEXPORT [[gnu::visibility("default")]]
# define @LIBRARY_NAME@_DLLLOCAL [[gnu::visibility("hidden")]]
# define @LIBRARY_NAME@_EXPLICIT_INSTANTIATION_DECLARATION_DLLIMPORT [[gnu::visibility("default")]]
# define @LIBRARY_NAME@_EXPLICIT_INSTANTIATION_DECLARATION_DLLEXPORT [[gnu::visibility("default")]]
# define @LIBRARY_NAME@_EXPLICIT_INSTANTIATION_DEFINITION_DLLIMPORT
# define @LIBRARY_NAME@_EXPLICIT_INSTANTIATION_DEFINITION_DLLEXPORT
# else
# define @LIBRARY_NAME@_DLLIMPORT __attribute__ ((visibility("default")))
# define @LIBRARY_NAME@_DLLEXPORT __attribute__ ((visibility("default")))
# define @LIBRARY_NAME@_DLLLOCAL __attribute__ ((visibility("hidden")))
# define @LIBRARY_NAME@_EXPLICIT_INSTANTIATION_DECLARATION_DLLIMPORT __attribute__ ((visibility("default")))
# define @LIBRARY_NAME@_EXPLICIT_INSTANTIATION_DECLARATION_DLLEXPORT __attribute__ ((visibility("default")))
# define @LIBRARY_NAME@_EXPLICIT_INSTANTIATION_DEFINITION_DLLIMPORT
# define @LIBRARY_NAME@_EXPLICIT_INSTANTIATION_DEFINITION_DLLEXPORT
# endif
# else
// Otherwise (GCC < 4 or another compiler is used), export everything.
# define @LIBRARY_NAME@_DLLIMPORT
Expand Down

0 comments on commit 52070f7

Please sign in to comment.