mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-18 05:01:50 -06:00
Help: Fix typos and style in add_link_options documentation
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
To pass options to the linker tool, each compiler driver has is own syntax.
|
To pass options to the linker tool, each compiler driver has its own syntax.
|
||||||
The ``LINKER:`` prefix can be used to specify, in a portable way, options
|
The ``LINKER:`` prefix and ``,`` separator can be used to specify, in a portable
|
||||||
to pass to the linker tool. The ``LINKER:`` prefix is replaced by the required
|
way, options to pass to the linker tool. ``LINKER:`` is replaced by the
|
||||||
driver option and the rest of the option string defines linker arguments using
|
appropriate driver option and ``,`` by the appropriate driver separator.
|
||||||
``,`` as separator. These arguments will be formatted according to the
|
The driver prefix and driver separator are given by the values of the
|
||||||
:variable:`CMAKE_<LANG>_LINKER_WRAPPER_FLAG` and
|
:variable:`CMAKE_<LANG>_LINKER_WRAPPER_FLAG` and
|
||||||
:variable:`CMAKE_<LANG>_LINKER_WRAPPER_FLAG_SEP` variables.
|
:variable:`CMAKE_<LANG>_LINKER_WRAPPER_FLAG_SEP` variables.
|
||||||
|
|
||||||
@@ -12,11 +12,11 @@ For example, ``"LINKER:-z,defs"`` becomes ``-Xlinker -z -Xlinker defs`` for
|
|||||||
The ``LINKER:`` prefix can be specified as part of a ``SHELL:`` prefix
|
The ``LINKER:`` prefix can be specified as part of a ``SHELL:`` prefix
|
||||||
expression.
|
expression.
|
||||||
|
|
||||||
The ``LINKER:`` prefix supports, as alternate syntax, specification of
|
The ``LINKER:`` prefix supports, as an alternative syntax, specification of
|
||||||
arguments using ``SHELL:`` prefix and space as separator. Previous example
|
arguments using the ``SHELL:`` prefix and space as separator. The previous
|
||||||
becomes ``"LINKER:SHELL:-z defs"``.
|
example then becomes ``"LINKER:SHELL:-z defs"``.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
Specifying ``SHELL:`` prefix elsewhere than at the beginning of the
|
Specifying the ``SHELL:`` prefix anywhere other than at the beginning of the
|
||||||
``LINKER:`` prefix is not supported.
|
``LINKER:`` prefix is not supported.
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
The final set of compile or link options used for a target is constructed by
|
The final set of compile or link options used for a target is constructed by
|
||||||
accumulating options from the current target and the usage requirements of
|
accumulating options from the current target and the usage requirements of
|
||||||
it dependencies. The set of options is de-duplicated to avoid repetition.
|
its dependencies. The set of options is de-duplicated to avoid repetition.
|
||||||
While beneficial for individual options, the de-duplication step can break
|
While beneficial for individual options, the de-duplication step can break
|
||||||
up option groups. For example, ``-D A -D B`` becomes ``-D A B``. One may
|
up option groups. For example, ``-D A -D B`` becomes ``-D A B``. One may
|
||||||
specify a group of options using shell-like quoting along with a ``SHELL:``
|
specify a group of options using shell-like quoting along with a ``SHELL:``
|
||||||
prefix. The ``SHELL:`` prefix is dropped and the rest of the option string
|
prefix. The ``SHELL:`` prefix is dropped, and the rest of the option string
|
||||||
is parsed using the :command:`separate_arguments` ``UNIX_COMMAND`` mode.
|
is parsed using the :command:`separate_arguments` ``UNIX_COMMAND`` mode.
|
||||||
For example, ``"SHELL:-D A" "SHELL:-D B"`` becomes ``-D A -D B``.
|
For example, ``"SHELL:-D A" "SHELL:-D B"`` becomes ``-D A -D B``.
|
||||||
|
|||||||
Reference in New Issue
Block a user