mirror of
https://github.com/reactos/CMake.git
synced 2024-12-14 07:09:22 +00:00
ENH: Added support for building kwsys with GCC visibility support.
When kwsys is built using GCC visibility support can be used. This is similar to the way that Windows exports symbols in DLLs, and requires projects that build kwsys to change the default visibility using some compiler flags. See http://gcc.gnu.org/wiki/Visibility for more details about GCC visibility.
This commit is contained in:
parent
4671b39363
commit
b0a0714343
@ -88,11 +88,15 @@
|
||||
#endif
|
||||
|
||||
/* Setup the export macro. */
|
||||
#if defined(_WIN32) && @KWSYS_BUILD_SHARED@
|
||||
# if defined(@KWSYS_NAMESPACE@_EXPORTS)
|
||||
# define @KWSYS_NAMESPACE@_EXPORT __declspec(dllexport)
|
||||
# else
|
||||
# define @KWSYS_NAMESPACE@_EXPORT __declspec(dllimport)
|
||||
#if @KWSYS_BUILD_SHARED@
|
||||
# if defined(_WIN32) || defined(__CYGWIN__)
|
||||
# if defined(@KWSYS_NAMESPACE@_EXPORTS)
|
||||
# define @KWSYS_NAMESPACE@_EXPORT __declspec(dllexport)
|
||||
# else
|
||||
# define @KWSYS_NAMESPACE@_EXPORT __declspec(dllimport)
|
||||
# endif
|
||||
# elif __GNUC__ >= 4
|
||||
# define @KWSYS_NAMESPACE@_EXPORT __attribute__ ((visibility("default")))
|
||||
# endif
|
||||
#else
|
||||
# define @KWSYS_NAMESPACE@_EXPORT
|
||||
|
Loading…
Reference in New Issue
Block a user