CMP0065.rst 1.1 KB

12345678910111213141516171819202122232425262728293031
  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. .. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.4
  18. .. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn by default
  19. .. include:: STANDARD_ADVICE.txt
  20. See documentation of the
  21. :variable:`CMAKE_POLICY_WARNING_CMP0065 <CMAKE_POLICY_WARNING_CMP<NNNN>>`
  22. variable to control the warning.
  23. .. include:: DEPRECATED.txt