CMP0063.rst 1.3 KB

12345678910111213141516171819202122232425262728
  1. CMP0063
  2. -------
  3. Honor visibility properties for all target types.
  4. The :prop_tgt:`<LANG>_VISIBILITY_PRESET` and
  5. :prop_tgt:`VISIBILITY_INLINES_HIDDEN` target properties affect visibility
  6. of symbols during dynamic linking. When first introduced these properties
  7. affected compilation of sources only in shared libraries, module libraries,
  8. and executables with the :prop_tgt:`ENABLE_EXPORTS` property set. This
  9. was sufficient for the basic use cases of shared libraries and executables
  10. with plugins. However, some sources may be compiled as part of static
  11. libraries or object libraries and then linked into a shared library later.
  12. CMake 3.3 and above prefer to honor these properties for sources compiled
  13. in all target types. This policy preserves compatibility for projects
  14. expecting the properties to work only for some target types.
  15. The ``OLD`` behavior for this policy is to ignore the visibility properties
  16. for static libraries, object libraries, and executables without exports.
  17. The ``NEW`` behavior for this policy is to honor the visibility properties
  18. for all target types.
  19. This policy was introduced in CMake version 3.3. CMake version
  20. |release| warns when the policy is not set and uses ``OLD`` behavior. Use
  21. the :command:`cmake_policy()` command to set it to ``OLD`` or ``NEW``
  22. explicitly.
  23. .. include:: DEPRECATED.txt