CMP0065.rst 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. CMP0065
  2. -------
  3. .. |REMOVED_IN_CMAKE_VERSION| replace:: 4.0
  4. .. include:: include/REMOVED_PROLOGUE.rst
  5. .. versionadded:: 3.4
  6. Do not add flags to export symbols from executables without
  7. the :prop_tgt:`ENABLE_EXPORTS` target property.
  8. CMake 3.3 and below, for historical reasons, always linked executables
  9. on some platforms with flags like ``-rdynamic`` to export symbols from
  10. the executables for use by any plugins they may load via ``dlopen``.
  11. CMake 3.4 and above prefer to do this only for executables that are
  12. explicitly marked with the :prop_tgt:`ENABLE_EXPORTS` target property.
  13. The ``OLD`` behavior of this policy is to always use the additional link
  14. flags when linking executables regardless of the value of the
  15. :prop_tgt:`ENABLE_EXPORTS` target property.
  16. The ``NEW`` behavior of this policy is to only use the additional link
  17. flags when linking executables if the :prop_tgt:`ENABLE_EXPORTS` target
  18. property is set to ``True``.
  19. .. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.4
  20. .. |WARNED_OR_DID_NOT_WARN| replace:: did *not* warn by default
  21. .. include:: include/REMOVED_EPILOGUE.rst
  22. See documentation of the
  23. :variable:`CMAKE_POLICY_WARNING_CMP0065 <CMAKE_POLICY_WARNING_CMP<NNNN>>`
  24. variable to control the warning in CMake versions before 4.0.