mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-04 13:19:51 -05:00
a6315790a1
SHARED and MODULE library targets have POSITION_INDEPENDENT_CODE default to TRUE regardless of CMAKE_POSITION_INDEPENDENT_CODE.
17 lines
643 B
ReStructuredText
17 lines
643 B
ReStructuredText
POSITION_INDEPENDENT_CODE
|
|
-------------------------
|
|
|
|
Whether to create a position-independent target
|
|
|
|
The ``POSITION_INDEPENDENT_CODE`` property determines whether position
|
|
independent executables or libraries will be created. This
|
|
property is ``True`` by default for ``SHARED`` and ``MODULE`` library
|
|
targets. For other targets, this property is initialized by the value
|
|
of the :variable:`CMAKE_POSITION_INDEPENDENT_CODE` variable if it is set
|
|
when the target is created, or ``False`` otherwise.
|
|
|
|
.. note::
|
|
|
|
For executable targets, the link step is controlled by the :policy:`CMP0083`
|
|
policy and the :module:`CheckPIESupported` module.
|