CMP0063.rst 1.3 KB

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