mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
Add the GenerateExportMacro with unit tests.
Reviewed-by: Marcus D. Hanwell <marcus.hanwell@kitware.com>
This commit is contained in:
59
Tests/Module/GenerateExportHeader/libshared/libshared.h
Normal file
59
Tests/Module/GenerateExportHeader/libshared/libshared.h
Normal file
@@ -0,0 +1,59 @@
|
||||
|
||||
#ifndef LIBSHARED_H
|
||||
#define LIBSHARED_H
|
||||
|
||||
#include "libshared_export.h"
|
||||
|
||||
class LIBSHARED_EXPORT Libshared {
|
||||
public:
|
||||
int libshared() const;
|
||||
|
||||
#ifdef COMPILER_IS_MSVC
|
||||
// Double exporting not possible with MSVC
|
||||
int libshared_exported() const;
|
||||
#else
|
||||
int LIBSHARED_EXPORT libshared_exported() const;
|
||||
#endif
|
||||
|
||||
int LIBSHARED_DEPRECATED libshared_deprecated() const;
|
||||
|
||||
int libshared_not_exported() const;
|
||||
|
||||
int LIBSHARED_NO_EXPORT libshared_excluded() const;
|
||||
};
|
||||
|
||||
class LibsharedNotExported {
|
||||
public:
|
||||
int libshared() const;
|
||||
|
||||
int LIBSHARED_EXPORT libshared_exported() const;
|
||||
|
||||
int LIBSHARED_DEPRECATED_EXPORT libshared_deprecated() const;
|
||||
|
||||
int libshared_not_exported() const;
|
||||
|
||||
int LIBSHARED_NO_EXPORT libshared_excluded() const;
|
||||
};
|
||||
|
||||
class LIBSHARED_NO_EXPORT LibsharedExcluded {
|
||||
public:
|
||||
int libshared() const;
|
||||
|
||||
int LIBSHARED_EXPORT libshared_exported() const;
|
||||
|
||||
int LIBSHARED_DEPRECATED_EXPORT libshared_deprecated() const;
|
||||
|
||||
int libshared_not_exported() const;
|
||||
|
||||
int LIBSHARED_NO_EXPORT libshared_excluded() const;
|
||||
};
|
||||
|
||||
LIBSHARED_EXPORT int libshared_exported();
|
||||
|
||||
LIBSHARED_DEPRECATED_EXPORT int libshared_deprecated();
|
||||
|
||||
int libshared_not_exported();
|
||||
|
||||
int LIBSHARED_NO_EXPORT libshared_excluded();
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user