CMP0063.rst 1.3 KB

123456789101112131415161718192021222324252627282930
  1. CMP0063
  2. -------
  3. .. |REMOVED_IN_CMAKE_VERSION| replace:: 4.0
  4. .. include:: include/REMOVED_PROLOGUE.rst
  5. .. versionadded:: 3.3
  6. Honor visibility properties for all target types.
  7. The :prop_tgt:`<LANG>_VISIBILITY_PRESET` and
  8. :prop_tgt:`VISIBILITY_INLINES_HIDDEN` target properties affect visibility
  9. of symbols during dynamic linking. When first introduced these properties
  10. affected compilation of sources only in shared libraries, module libraries,
  11. and executables with the :prop_tgt:`ENABLE_EXPORTS` property set. This
  12. was sufficient for the basic use cases of shared libraries and executables
  13. with plugins. However, some sources may be compiled as part of static
  14. libraries or object libraries and then linked into a shared library later.
  15. CMake 3.3 and above prefer to honor these properties for sources compiled
  16. in all target types. This policy preserves compatibility for projects
  17. expecting the properties to work only for some target types.
  18. The ``OLD`` behavior for this policy is to ignore the visibility properties
  19. for static libraries, object libraries, and executables without exports.
  20. The ``NEW`` behavior for this policy is to honor the visibility properties
  21. for all target types.
  22. .. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.3
  23. .. |WARNED_OR_DID_NOT_WARN| replace:: warned
  24. .. include:: include/REMOVED_EPILOGUE.rst