diff --git a/config.hh.cmake b/config.hh.cmake index f3b0658a1..d3b4a367b 100644 --- a/config.hh.cmake +++ b/config.hh.cmake @@ -50,26 +50,13 @@ # else // On Linux, for GCC >= 4, tag symbols using GCC extension. # if __GNUC__ >= 4 -// Use C++11 attribute if avaiable. -// This avoid issue when mixing old and C++11 attributes with GCC < 13 -# 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")]] -// gnu::visibility is not working with clang and explicit template instantiation -# 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 -# 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 +# 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 # else // Otherwise (GCC < 4 or another compiler is used), export everything. # define @LIBRARY_NAME@_DLLIMPORT