aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/ECMGenerateExportHeader.cmake15
1 files changed, 15 insertions, 0 deletions
diff --git a/modules/ECMGenerateExportHeader.cmake b/modules/ECMGenerateExportHeader.cmake
index 52dd29d4..5b34b53e 100644
--- a/modules/ECMGenerateExportHeader.cmake
+++ b/modules/ECMGenerateExportHeader.cmake
@@ -51,6 +51,7 @@
# ``DEPRECATION_VERSIONS`` specifies versions in "<major>.<minor>" format in
# which API was declared deprecated. Any version used with the generated
# macro ``<prefix_name><base_name>_DEPRECATED_VERSION(major, minor, text)``
+# or ``<prefix_name><base_name>_DEPRECATED_VERSION_BELATED(major, minor, textmajor, textminor, text)``
# needs to be listed here, otherwise the macro will fail to work.
#
# ``EXCLUDE_DEPRECATED_BEFORE_AND_AT`` specifies the version for which all API
@@ -94,6 +95,16 @@
# or function (other elements to be supported in future versions), depending
# on the visibility macro flags set (see below)
#
+# ``<prefix_name><uppercase_base_name>_DEPRECATED_VERSION_BELATED(major, minor, textmajor, textminor, text)``
+# to use to conditionally set a
+# ``<prefix_name><uppercase_base_name>_DEPRECATED`` macro for a class, struct
+# or function (other elements to be supported in future versions), depending
+# on the visibility macro flags set (see below), with ``major`` & ``minor``
+# applied for the logic and ``textmajor`` & ``textminor`` for the warnings message.
+# Useful for retroactive tagging of API for the compiler without injecting the
+# API into the compiler warning conditions of already released versions.
+# Since 5.71.
+#
# ``<prefix_name><uppercase_base_name>_ENABLE_DEPRECATED_SINCE(major, minor)``
# evaluates to ``TRUE`` or ``FALSE`` depending on the visibility macro flags
# set (see below). To be used mainly with ``#if``/``#endif`` to mark sections
@@ -684,6 +695,10 @@ function(ecm_generate_export_header target)
"#define ${_macro_base_name}_DEPRECATED_VERSION(major, minor, text) ${_macro_base_name}_DEPRECATED_VERSION_##major(minor, \"Since \"#major\".\"#minor\". \" text)
"
)
+ string(APPEND _output
+"#define ${_macro_base_name}_DEPRECATED_VERSION_BELATED(major, minor, textmajor, textminor, text) ${_macro_base_name}_DEPRECATED_VERSION_##major(minor, \"Since \"#textmajor\".\"#textminor\". \" text)
+"
+ )
endif()
if (ARGS_CUSTOM_CONTENT_FROM_VARIABLE)
string(APPEND _output "${ARGS_CUSTOM_CONTENT_FROM_VARIABLE}\n")