mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-29 10:39:28 -05:00
Add the GenerateExportMacro with unit tests.
Reviewed-by: Marcus D. Hanwell <marcus.hanwell@kitware.com>
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
|
||||
project(libstatic)
|
||||
|
||||
# Show that the export header has no effect on a static library.
|
||||
|
||||
add_library(libstatic STATIC libstatic.cpp)
|
||||
|
||||
generate_export_header(libstatic)
|
||||
@@ -0,0 +1,87 @@
|
||||
|
||||
#include "libstatic.h"
|
||||
|
||||
int Libstatic::libstatic() const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int Libstatic::libstatic_exported() const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int Libstatic::libstatic_deprecated() const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int Libstatic::libstatic_not_exported() const {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int Libstatic::libstatic_excluded() const {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int LibstaticNotExported::libstatic() const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int LibstaticNotExported::libstatic_exported() const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int LibstaticNotExported::libstatic_deprecated() const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int LibstaticNotExported::libstatic_not_exported() const {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int LibstaticNotExported::libstatic_excluded() const {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int LibstaticExcluded::libstatic() const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int LibstaticExcluded::libstatic_exported() const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int LibstaticExcluded::libstatic_deprecated() const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int LibstaticExcluded::libstatic_not_exported() const {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int LibstaticExcluded::libstatic_excluded() const {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int libstatic_exported() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int libstatic_deprecated() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int libstatic_not_exported() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int libstatic_excluded() {
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
|
||||
#ifndef LIBSTATIC_H
|
||||
#define LIBSTATIC_H
|
||||
|
||||
#include "libstatic_export.h"
|
||||
|
||||
class LIBSTATIC_EXPORT Libstatic {
|
||||
public:
|
||||
int libstatic() const;
|
||||
|
||||
int LIBSTATIC_EXPORT libstatic_exported() const;
|
||||
|
||||
int LIBSTATIC_DEPRECATED libstatic_deprecated() const;
|
||||
|
||||
int libstatic_not_exported() const;
|
||||
|
||||
int LIBSTATIC_NO_EXPORT libstatic_excluded() const;
|
||||
};
|
||||
|
||||
class LibstaticNotExported {
|
||||
public:
|
||||
int libstatic() const;
|
||||
|
||||
int LIBSTATIC_EXPORT libstatic_exported() const;
|
||||
|
||||
int LIBSTATIC_DEPRECATED libstatic_deprecated() const;
|
||||
|
||||
int libstatic_not_exported() const;
|
||||
|
||||
int LIBSTATIC_NO_EXPORT libstatic_excluded() const;
|
||||
};
|
||||
|
||||
class LIBSTATIC_NO_EXPORT LibstaticExcluded {
|
||||
public:
|
||||
int libstatic() const;
|
||||
|
||||
int LIBSTATIC_EXPORT libstatic_exported() const;
|
||||
|
||||
int LIBSTATIC_DEPRECATED libstatic_deprecated() const;
|
||||
|
||||
int libstatic_not_exported() const;
|
||||
|
||||
int LIBSTATIC_NO_EXPORT libstatic_excluded() const;
|
||||
};
|
||||
|
||||
LIBSTATIC_EXPORT int libstatic_exported();
|
||||
|
||||
LIBSTATIC_DEPRECATED int libstatic_deprecated();
|
||||
|
||||
int libstatic_not_exported();
|
||||
|
||||
int LIBSTATIC_NO_EXPORT libstatic_excluded();
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user