From 8fea95319bcaac741faf93bd66b3a1838b56a418 Mon Sep 17 00:00:00 2001 From: Nikita Nemkin Date: Thu, 12 Nov 2020 13:40:33 +0500 Subject: Help: Add `.. versionadded` directives to module docs Issue: #19715 --- Modules/GenerateExportHeader.cmake | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'Modules/GenerateExportHeader.cmake') diff --git a/Modules/GenerateExportHeader.cmake b/Modules/GenerateExportHeader.cmake index e4481f66d1..bc1eb1799f 100644 --- a/Modules/GenerateExportHeader.cmake +++ b/Modules/GenerateExportHeader.cmake @@ -9,6 +9,9 @@ Function for generation of export macros for libraries This module provides the function ``GENERATE_EXPORT_HEADER()``. +.. versionadded:: 3.12 + Added support for C projects. Previous versions supported C++ project only. + The ``GENERATE_EXPORT_HEADER`` function can be used to generate a file suitable for preprocessor inclusion which contains EXPORT macros to be used in library classes:: @@ -27,7 +30,6 @@ used in library classes:: [CUSTOM_CONTENT_FROM_VARIABLE ] ) - The target properties :prop_tgt:`CXX_VISIBILITY_PRESET <_VISIBILITY_PRESET>` and :prop_tgt:`VISIBILITY_INLINES_HIDDEN` can be used to add the appropriate compile flags for targets. See the documentation of those target properties, @@ -170,20 +172,30 @@ For example: Generates the macros ``VTK_SOMELIB_EXPORT`` etc. +.. versionadded:: 3.1 + Library target can be an ``OBJECT`` library. + +.. versionadded:: 3.7 + Added the ``CUSTOM_CONTENT_FROM_VARIABLE`` option. + +.. versionadded:: 3.11 + Added the ``INCLUDE_GUARD_NAME`` option. + :: ADD_COMPILER_EXPORT_FLAGS( [] ) +.. deprecated:: 3.0 + Set the target properties + :prop_tgt:`CXX_VISIBILITY_PRESET <_VISIBILITY_PRESET>` and + :prop_tgt:`VISIBILITY_INLINES_HIDDEN` instead. + The ``ADD_COMPILER_EXPORT_FLAGS`` function adds ``-fvisibility=hidden`` to :variable:`CMAKE_CXX_FLAGS _FLAGS>` if supported, and is a no-op on Windows which does not need extra compiler flags for exporting support. You may optionally pass a single argument to ``ADD_COMPILER_EXPORT_FLAGS`` that will be populated with the ``CXX_FLAGS`` required to enable visibility support for the compiler/architecture in use. - -This function is deprecated. Set the target properties -:prop_tgt:`CXX_VISIBILITY_PRESET <_VISIBILITY_PRESET>` and -:prop_tgt:`VISIBILITY_INLINES_HIDDEN` instead. #]=======================================================================] include(CheckCCompilerFlag) -- cgit v1.2.1