summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@crascit.com>2024-03-25 21:02:46 (GMT)
committerCraig Scott <craig.scott@crascit.com>2024-03-25 21:03:14 (GMT)
commitaecea7b28bbf2e7651c7d01af496f5f1c498364d (patch)
treee949478f4c36375e0a3255e10589641602d4292a
parent5b21897c6e1576593c8bb01ba08792c1bf9ff15d (diff)
downloadCMake-aecea7b28bbf2e7651c7d01af496f5f1c498364d.zip
CMake-aecea7b28bbf2e7651c7d01af496f5f1c498364d.tar.gz
CMake-aecea7b28bbf2e7651c7d01af496f5f1c498364d.tar.bz2
Help: Grammar, typos and wording improvements for linker variables
-rw-r--r--Help/variable/CMAKE_LANG_COMPILER_LINKER_FRONTEND_VARIANT.rst11
-rw-r--r--Help/variable/CMAKE_LANG_COMPILER_LINKER_ID.rst4
-rw-r--r--Help/variable/CMAKE_LANG_USING_LINKER_MODE.rst4
-rw-r--r--Help/variable/CMAKE_LANG_USING_LINKER_TYPE.rst24
-rw-r--r--Help/variable/CMAKE_LINKER_TYPE.rst8
5 files changed, 24 insertions, 27 deletions
diff --git a/Help/variable/CMAKE_LANG_COMPILER_LINKER_FRONTEND_VARIANT.rst b/Help/variable/CMAKE_LANG_COMPILER_LINKER_FRONTEND_VARIANT.rst
index d7d028a..735375c 100644
--- a/Help/variable/CMAKE_LANG_COMPILER_LINKER_FRONTEND_VARIANT.rst
+++ b/Help/variable/CMAKE_LANG_COMPILER_LINKER_FRONTEND_VARIANT.rst
@@ -6,16 +6,13 @@ CMAKE_<LANG>_COMPILER_LINKER_FRONTEND_VARIANT
Identification string of the linker frontend variant.
Some linkers have multiple, different frontends for accepting command
-line options. (For example ``LLCM LLD`` originally only had a frontend
-compatible with the ``GNU`` compiler but since its port to Windows
-(``lld-link``) it now also supports a frontend compatible with ``MSVC``.)
-When CMake detects such a linker it sets this variable to what would have been
+line options. For example, ``LLVM LLD`` originally only had a frontend
+compatible with the ``GNU`` compiler, but since its port to Windows
+(``lld-link``), it now also supports a frontend compatible with ``MSVC``.
+When CMake detects such a linker, it sets this variable to what would have been
the :variable:`CMAKE_<LANG>_COMPILER_LINKER_ID` for the linker whose frontend
it resembles.
.. note::
In other words, this variable describes what command line options
and language extensions the linker frontend expects.
-
- This variable is set for ``GNU``, ``MSVC``, ``MOLD`` and ``AppleClang``
- linkers that have only one frontend variant.
diff --git a/Help/variable/CMAKE_LANG_COMPILER_LINKER_ID.rst b/Help/variable/CMAKE_LANG_COMPILER_LINKER_ID.rst
index 0607aea..a57fd33 100644
--- a/Help/variable/CMAKE_LANG_COMPILER_LINKER_ID.rst
+++ b/Help/variable/CMAKE_LANG_COMPILER_LINKER_ID.rst
@@ -17,8 +17,8 @@ Value Name
``bfd``)
``GNUgold`` `GNU Binutils - gold linker`_
``MSVC`` `Microsoft Visual Studio`_
-``MOLD`` `mold: A Modern Linker`_ or, on Apple, `sold`_
- linker
+``MOLD`` `mold: A Modern Linker`_, or on Apple the
+ `sold`_ linker
``AIX`` AIX system linker
``Solaris`` SunOS system linker
=============================== ===============================================
diff --git a/Help/variable/CMAKE_LANG_USING_LINKER_MODE.rst b/Help/variable/CMAKE_LANG_USING_LINKER_MODE.rst
index c9b6779..66ce26b 100644
--- a/Help/variable/CMAKE_LANG_USING_LINKER_MODE.rst
+++ b/Help/variable/CMAKE_LANG_USING_LINKER_MODE.rst
@@ -3,8 +3,8 @@ CMAKE_<LANG>_USING_LINKER_MODE
.. versionadded:: 3.29
-This variable specify what is the type of data stored in variable
- :variable:`CMAKE_<LANG>_USING_LINKER_<TYPE>`. There are two possible values:
+This controls how the value of the :variable:`CMAKE_<LANG>_USING_LINKER_<TYPE>`
+variable should be interpreted. The supported linker mode values are:
``FLAG``
:variable:`CMAKE_<LANG>_USING_LINKER_<TYPE>` holds compiler flags. This is
diff --git a/Help/variable/CMAKE_LANG_USING_LINKER_TYPE.rst b/Help/variable/CMAKE_LANG_USING_LINKER_TYPE.rst
index d4714c3..88c0335 100644
--- a/Help/variable/CMAKE_LANG_USING_LINKER_TYPE.rst
+++ b/Help/variable/CMAKE_LANG_USING_LINKER_TYPE.rst
@@ -3,32 +3,32 @@ CMAKE_<LANG>_USING_LINKER_<TYPE>
.. versionadded:: 3.29
-This variable defines how to specify the linker for the link step for the type
-as specified by the variable :variable:`CMAKE_LINKER_TYPE` or the target
-property :prop_tgt:`LINKER_TYPE`. It can hold compiler flags for the link step
-or directly the linker tool. The type of data is given by the variable
-:variable:`CMAKE_<LANG>_USING_LINKER_MODE`.
+This variable defines how to specify the ``<TYPE>`` linker for the link step,
+as controlled by the :variable:`CMAKE_LINKER_TYPE` variable or the
+:prop_tgt:`LINKER_TYPE` target property. Depending on the value of the
+:variable:`CMAKE_<LANG>_USING_LINKER_MODE` variable,
+``CMAKE_<LANG>_USING_LINKER_<TYPE>`` can hold compiler flags for the link step,
+or flags to be given directly to the linker tool.
.. note::
- The specified linker tool is expected to be accessible through
- the ``PATH`` environment variable, particularly when the
- :variable:`CMAKE_<LANG>_USING_LINKER_MODE` variable is set to ``FLAG``.
+ The specified linker tool is generally expected to be accessible through
+ the ``PATH`` environment variable.
-For example, to specify the ``LLVM`` linker for ``GNU`` compilers, we have:
+For example, the ``LLD`` linker for ``GNU`` compilers is defined like so:
.. code-block:: cmake
set(CMAKE_C_USING_LINKER_LLD "-fuse-ld=lld")
-Or on ``Windows`` platform, for ``Clang`` compilers simulating ``MSVC``, we
-have:
+On the ``Windows`` platform with ``Clang`` compilers simulating ``MSVC``:
.. code-block:: cmake
set(CMAKE_C_USING_LINKER_LLD "-fuse-ld=lld-link")
-And for the ``MSVC`` compiler, linker is directly used, so we have:
+And for the ``MSVC`` compiler, the linker is invoked directly, not via the
+compiler frontend:
.. code-block:: cmake
diff --git a/Help/variable/CMAKE_LINKER_TYPE.rst b/Help/variable/CMAKE_LINKER_TYPE.rst
index 17ea947..ac72c38 100644
--- a/Help/variable/CMAKE_LINKER_TYPE.rst
+++ b/Help/variable/CMAKE_LINKER_TYPE.rst
@@ -9,10 +9,10 @@ Specify which linker will be used for the link step.
It is assumed that the linker specified is fully compatible with the standard
one. CMake will not do any options translation.
-This variable is used to initialize the :prop_tgt:`LINKER_TYPE` target
-property when they are created by calls to :command:`add_library` or
-:command:`add_executable` commands. It is meaningful only for targets having a
-link step. If set, its value is also used by the :command:`try_compile`
+This variable is used to initialize the :prop_tgt:`LINKER_TYPE` property
+on each target created by a call to :command:`add_library` or
+:command:`add_executable`. It is meaningful only for targets having a
+link step. If set, its value is also used by the :command:`try_compile`
command.
.. include:: LINKER_PREDEFINED_TYPES.txt