diff options
| author | Stephen Kelly <steveire@gmail.com> | 2013-12-11 00:01:50 (GMT) |
|---|---|---|
| committer | Stephen Kelly <steveire@gmail.com> | 2013-12-15 10:22:19 (GMT) |
| commit | 4017db13aa54527e979f80f059b9aab1b344734e (patch) | |
| tree | ac32315a438fd81911dc859a7abecb971a20b590 /Tests/Module/GenerateExportHeader/reference/UNIX/libshared_export.h | |
| parent | a2489ce49c0cbf5582a29ef8c4a0d9728994f465 (diff) | |
| download | CMake-4017db13aa54527e979f80f059b9aab1b344734e.zip CMake-4017db13aa54527e979f80f059b9aab1b344734e.tar.gz CMake-4017db13aa54527e979f80f059b9aab1b344734e.tar.bz2 | |
Speed up the GenerateExportHeader unit test (#14453).
Instead of running many small tests with many cmake projects, simply
compare the generated export header against a reference.
Remove the helper macros and the try_compiles which are duplicates
of the library build tests.
Diffstat (limited to 'Tests/Module/GenerateExportHeader/reference/UNIX/libshared_export.h')
| -rw-r--r-- | Tests/Module/GenerateExportHeader/reference/UNIX/libshared_export.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/Tests/Module/GenerateExportHeader/reference/UNIX/libshared_export.h b/Tests/Module/GenerateExportHeader/reference/UNIX/libshared_export.h new file mode 100644 index 0000000..7d8087f --- /dev/null +++ b/Tests/Module/GenerateExportHeader/reference/UNIX/libshared_export.h @@ -0,0 +1,41 @@ + +#ifndef LIBSHARED_EXPORT_H +#define LIBSHARED_EXPORT_H + +#ifdef LIBSHARED_STATIC_DEFINE +# define LIBSHARED_EXPORT +# define LIBSHARED_NO_EXPORT +#else +# ifndef LIBSHARED_EXPORT +# ifdef libshared_EXPORTS + /* We are building this library */ +# define LIBSHARED_EXPORT __attribute__((visibility("default"))) +# else + /* We are using this library */ +# define LIBSHARED_EXPORT __attribute__((visibility("default"))) +# endif +# endif + +# ifndef LIBSHARED_NO_EXPORT +# define LIBSHARED_NO_EXPORT __attribute__((visibility("hidden"))) +# endif +#endif + +#ifndef LIBSHARED_DEPRECATED +# define LIBSHARED_DEPRECATED __attribute__ ((__deprecated__)) +#endif + +#ifndef LIBSHARED_DEPRECATED_EXPORT +# define LIBSHARED_DEPRECATED_EXPORT LIBSHARED_EXPORT LIBSHARED_DEPRECATED +#endif + +#ifndef LIBSHARED_DEPRECATED_NO_EXPORT +# define LIBSHARED_DEPRECATED_NO_EXPORT LIBSHARED_NO_EXPORT LIBSHARED_DEPRECATED +#endif + +#define DEFINE_NO_DEPRECATED 0 +#if DEFINE_NO_DEPRECATED +# define LIBSHARED_NO_DEPRECATED +#endif + +#endif |
