From 80d5090a2c084c1b14a4cafce14d8ca9fec8a6c9 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Mon, 23 Sep 2013 07:43:57 +0200 Subject: [PATCH 1/2] GEH: Use the macro for the deprecation attribute after definiting it. This way, it is more-easily overridden. --- Modules/exportheader.cmake.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/exportheader.cmake.in b/Modules/exportheader.cmake.in index 80a879d7e..4fe589dd5 100644 --- a/Modules/exportheader.cmake.in +++ b/Modules/exportheader.cmake.in @@ -23,8 +23,8 @@ #ifndef @DEPRECATED_MACRO_NAME@ # define @DEPRECATED_MACRO_NAME@ @DEFINE_DEPRECATED@ -# define @DEPRECATED_MACRO_NAME@_EXPORT @EXPORT_MACRO_NAME@ @DEFINE_DEPRECATED@ -# define @DEPRECATED_MACRO_NAME@_NO_EXPORT @NO_EXPORT_MACRO_NAME@ @DEFINE_DEPRECATED@ +# define @DEPRECATED_MACRO_NAME@_EXPORT @EXPORT_MACRO_NAME@ @DEPRECATED_MACRO_NAME@ +# define @DEPRECATED_MACRO_NAME@_NO_EXPORT @NO_EXPORT_MACRO_NAME@ @DEPRECATED_MACRO_NAME@ #endif #cmakedefine01 DEFINE_NO_DEPRECATED From cdf55d5cb4c03a29c21b5eae8ac5c59d244b9b45 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Mon, 23 Sep 2013 07:44:37 +0200 Subject: [PATCH 2/2] GEH: Make each element of the deprecation macros overridable. This way, we can override only FOO_DEPRECATED to silence deprecation for a library. --- Modules/exportheader.cmake.in | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Modules/exportheader.cmake.in b/Modules/exportheader.cmake.in index 4fe589dd5..118de16d6 100644 --- a/Modules/exportheader.cmake.in +++ b/Modules/exportheader.cmake.in @@ -23,7 +23,13 @@ #ifndef @DEPRECATED_MACRO_NAME@ # define @DEPRECATED_MACRO_NAME@ @DEFINE_DEPRECATED@ +#endif + +#ifndef @DEPRECATED_MACRO_NAME@_EXPORT # define @DEPRECATED_MACRO_NAME@_EXPORT @EXPORT_MACRO_NAME@ @DEPRECATED_MACRO_NAME@ +#endif + +#ifndef @DEPRECATED_MACRO_NAME@_NO_EXPORT # define @DEPRECATED_MACRO_NAME@_NO_EXPORT @NO_EXPORT_MACRO_NAME@ @DEPRECATED_MACRO_NAME@ #endif