CMP0083.rst 982 B

123456789101112131415161718192021222324
  1. CMP0083
  2. -------
  3. To control generation of Position Independent Executable (``PIE``) or not, some
  4. flags are required at link time.
  5. CMake 3.13 and lower did not add these link flags when
  6. :prop_tgt:`POSITION_INDEPENDENT_CODE` is set.
  7. The ``OLD`` behavior for this policy is to not manage ``PIE`` link flags. The
  8. ``NEW`` behavior is to add link flags if :prop_tgt:`POSITION_INDEPENDENT_CODE`
  9. is set:
  10. * Set to ``TRUE``: flags to produce a position independent executable are
  11. passed to the linker step. For example ``-pie`` for ``GCC``.
  12. * Set to ``FALSE``: flags not to produce a position independent executable are
  13. passed to the linker step. For example ``-no-pie`` for ``GCC``.
  14. * Not set: no flags are passed to the linker step.
  15. This policy was introduced in CMake version 3.14. CMake version
  16. |release| warns when the policy is not set and uses ``OLD`` behavior. Use
  17. the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly.
  18. .. include:: DEPRECATED.txt