diff options
author | Brad King <brad.king@kitware.com> | 2016-09-01 19:22:05 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-09-05 13:45:42 (GMT) |
commit | fc3dab0ea956db618fe2b77778ac413db846b422 (patch) | |
tree | de71447ff4c14e7a2d204ed94445f162a49d9266 /Tests/RunCMake/GenerateExportHeader/libshared | |
parent | 4feba34d02fe42fd20209e5b247f91d8e0f7a2ac (diff) | |
download | CMake-fc3dab0ea956db618fe2b77778ac413db846b422.zip CMake-fc3dab0ea956db618fe2b77778ac413db846b422.tar.gz CMake-fc3dab0ea956db618fe2b77778ac413db846b422.tar.bz2 |
Tests: Port GenerateExportHeader test to RunCMake infrastructure
This will allow build failure cases to be added later.
Diffstat (limited to 'Tests/RunCMake/GenerateExportHeader/libshared')
3 files changed, 175 insertions, 0 deletions
diff --git a/Tests/RunCMake/GenerateExportHeader/libshared/CMakeLists.txt b/Tests/RunCMake/GenerateExportHeader/libshared/CMakeLists.txt new file mode 100644 index 0000000..e20adb1 --- /dev/null +++ b/Tests/RunCMake/GenerateExportHeader/libshared/CMakeLists.txt @@ -0,0 +1,16 @@ + +cmake_minimum_required(VERSION 2.8) + +project(libshared) + +include(GenerateExportHeader) + +add_compiler_export_flags() + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +add_library(libshared SHARED libshared.cpp) + +generate_export_header(libshared) + +export(TARGETS libshared FILE Targets.cmake) diff --git a/Tests/RunCMake/GenerateExportHeader/libshared/libshared.cpp b/Tests/RunCMake/GenerateExportHeader/libshared/libshared.cpp new file mode 100644 index 0000000..ad6d356 --- /dev/null +++ b/Tests/RunCMake/GenerateExportHeader/libshared/libshared.cpp @@ -0,0 +1,102 @@ + +#include "libshared.h" + +int Libshared::libshared() const +{ + return 0; +} + +int Libshared::libshared_exported() const +{ + return 0; +} + +int Libshared::libshared_deprecated() const +{ + return 0; +} + +int Libshared::libshared_not_exported() const +{ + return 0; +} + +int Libshared::libshared_excluded() const +{ + return 0; +} + +int LibsharedNotExported::libshared() const +{ + return 0; +} + +int LibsharedNotExported::libshared_exported() const +{ + return 0; +} + +int LibsharedNotExported::libshared_deprecated() const +{ + return 0; +} + +int LibsharedNotExported::libshared_not_exported() const +{ + return 0; +} + +int LibsharedNotExported::libshared_excluded() const +{ + return 0; +} + +int LibsharedExcluded::libshared() const +{ + return 0; +} + +int LibsharedExcluded::libshared_exported() const +{ + return 0; +} + +int LibsharedExcluded::libshared_deprecated() const +{ + return 0; +} + +int LibsharedExcluded::libshared_not_exported() const +{ + return 0; +} + +int LibsharedExcluded::libshared_excluded() const +{ + return 0; +} + +int libshared() +{ + return 0; +} + +int libshared_exported() +{ + return 0; +} + +int libshared_deprecated() +{ + return 0; +} + +int libshared_not_exported() +{ + return 0; +} + +int libshared_excluded() +{ + return 0; +} diff --git a/Tests/RunCMake/GenerateExportHeader/libshared/libshared.h b/Tests/RunCMake/GenerateExportHeader/libshared/libshared.h new file mode 100644 index 0000000..bd9f2e3 --- /dev/null +++ b/Tests/RunCMake/GenerateExportHeader/libshared/libshared.h @@ -0,0 +1,57 @@ + +#ifndef LIBSHARED_H +#define LIBSHARED_H + +#include "libshared_export.h" + +class LIBSHARED_EXPORT Libshared +{ +public: + int libshared() const; + + int libshared_exported() const; + + 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 |