CMP0065.rst 1.2 KB

1234567891011121314151617181920212223242526272829
  1. CMP0065
  2. -------
  3. .. versionadded:: 3.4
  4. Do not add flags to export symbols from executables without
  5. the :prop_tgt:`ENABLE_EXPORTS` target property.
  6. CMake 3.3 and below, for historical reasons, always linked executables
  7. on some platforms with flags like ``-rdynamic`` to export symbols from
  8. the executables for use by any plugins they may load via ``dlopen``.
  9. CMake 3.4 and above prefer to do this only for executables that are
  10. explicitly marked with the :prop_tgt:`ENABLE_EXPORTS` target property.
  11. The ``OLD`` behavior of this policy is to always use the additional link
  12. flags when linking executables regardless of the value of the
  13. :prop_tgt:`ENABLE_EXPORTS` target property.
  14. The ``NEW`` behavior of this policy is to only use the additional link
  15. flags when linking executables if the :prop_tgt:`ENABLE_EXPORTS` target
  16. property is set to ``True``.
  17. This policy was introduced in CMake version 3.4. Unlike most policies,
  18. CMake version |release| does *not* warn by default when this policy
  19. is not set and simply uses ``OLD`` behavior. See documentation of the
  20. :variable:`CMAKE_POLICY_WARNING_CMP0065 <CMAKE_POLICY_WARNING_CMP<NNNN>>`
  21. variable to control the warning.
  22. .. include:: DEPRECATED.txt