diff options
author | Stephen Kelly <steveire@gmail.com> | 2011-07-13 00:13:33 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2011-08-07 16:33:47 (GMT) |
commit | 30880707c094ac5c0edd85d0857afb6fbae55326 (patch) | |
tree | 837b58ac331f34eeefaced63c4c0a71ee59ef69e /Modules/exportheader.cmake.in | |
parent | 955d5133ab2f8bca5372e81af544cafdafc31994 (diff) | |
download | CMake-30880707c094ac5c0edd85d0857afb6fbae55326.zip CMake-30880707c094ac5c0edd85d0857afb6fbae55326.tar.gz CMake-30880707c094ac5c0edd85d0857afb6fbae55326.tar.bz2 |
Add the GenerateExportMacro with unit tests.
Reviewed-by: Marcus D. Hanwell <marcus.hanwell@kitware.com>
Diffstat (limited to 'Modules/exportheader.cmake.in')
-rw-r--r-- | Modules/exportheader.cmake.in | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Modules/exportheader.cmake.in b/Modules/exportheader.cmake.in new file mode 100644 index 0000000..083e95c --- /dev/null +++ b/Modules/exportheader.cmake.in @@ -0,0 +1,30 @@ + +#ifndef @INCLUDE_GUARD_NAME@ +#define @INCLUDE_GUARD_NAME@ + +#ifdef @STATIC_DEFINE@ +# define @EXPORT_MACRO_NAME@ +# define @NO_EXPORT_MACRO_NAME@ +#else +# ifndef @EXPORT_MACRO_NAME@ +# ifdef @TARGET_LIBRARY@_EXPORTS + /* We are building this library */ +# define @EXPORT_MACRO_NAME@ @DEFINE_EXPORT@ +# else + /* We are using this library */ +# define @EXPORT_MACRO_NAME@ @DEFINE_IMPORT@ +# endif +# endif + +# ifndef @NO_EXPORT_MACRO_NAME@ +# define @NO_EXPORT_MACRO_NAME@ @DEFINE_NO_EXPORT@ +# endif +#endif + +#ifndef @DEPRECATED_NAME@ +# define @DEPRECATED_NAME@ @DEFINE_DEPRECATED@ +# define @DEPRECATED_NAME@_EXPORT @EXPORT_MACRO_NAME@ @DEFINE_DEPRECATED@ +# define @DEPRECATED_NAME@_NO_EXPORT @NO_EXPORT_MACRO_NAME@ @DEFINE_DEPRECATED@ +#endif + +#endif // @INCLUDE_GUARD_NAME@
\ No newline at end of file |