[CMake] Reason for deprecation of GenerateExportHeader ?

Jean-Michaël Celerier jeanmichael.celerier at gmail.com
Fri Jun 8 16:38:06 EDT 2018


Hello,

the documentation page
https://cmake.org/cmake/help/v3.11/module/GenerateExportHeader.html has the
mention :

> This function is deprecated. Set the target properties
CXX_VISIBILITY_PRESET and VISIBILITY_INLINES_HIDDEN instead.

Why is that so ? I don't know any library that would export either all or
none of its symbols ; functions & types of the public API must always be
chosen manually by the author of the library anyways. The only use of
CXX_VISIBILITY_PRESET is to set the visibility to hidden by default, so
that code can then use the export macros defined by the generate_export _
header code to make specific symbols visible.

Best,
Jean-Michaël

-------
Jean-Michaël Celerier
http://www.jcelerier.name
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20180608/ad25b2f6/attachment.html>


More information about the CMake mailing list