Help: Fix description of CMAKE_*_LINKER_FLAGS variables

Improve the wording on the behavior of the per-configuration variants
of `CMAKE_*_LINKER_FLAGS`. In particular, note that these variables
only apply to the specified build configuration, and replace the
ambiguous reference to `CMAKE_C_FLAGS_*` with a precise description.

Clarify that the "default" variants of these variables apply for all
build configurations.

Add links between pages for the default and per-configuration variables.
This commit is contained in:
Tyler Yankee
2026-01-16 11:44:56 -05:00
parent 29b1d0baa9
commit 7b4b556e2d
6 changed files with 42 additions and 8 deletions

View File

@@ -3,6 +3,12 @@ CMAKE_EXE_LINKER_FLAGS
Linker flags to be used to create executables.
These flags will be used by the linker when creating an executable.
These flags will be used by the linker when creating an executable for all
build configurations.
.. include:: ../variable/include/LINKER_FLAGS.rst
See Also
^^^^^^^^
* :variable:`CMAKE_EXE_LINKER_FLAGS_<CONFIG>`

View File

@@ -3,7 +3,12 @@ CMAKE_EXE_LINKER_FLAGS_<CONFIG>
Flags to be used when linking an executable.
Same as ``CMAKE_C_FLAGS_*`` but used by the linker when creating
executables.
These flags will be used by the linker when creating an executable for the
``<CONFIG>`` configuration.
.. include:: ../variable/include/LINKER_FLAGS.rst
See Also
^^^^^^^^
* :variable:`CMAKE_EXE_LINKER_FLAGS`

View File

@@ -3,6 +3,12 @@ CMAKE_MODULE_LINKER_FLAGS
Linker flags to be used to create modules.
These flags will be used by the linker when creating a module.
These flags will be used by the linker when creating a module for all build
configurations.
.. include:: ../variable/include/LINKER_FLAGS.rst
See Also
^^^^^^^^
* :variable:`CMAKE_MODULE_LINKER_FLAGS_<CONFIG>`

View File

@@ -3,6 +3,12 @@ CMAKE_MODULE_LINKER_FLAGS_<CONFIG>
Flags to be used when linking a module.
Same as ``CMAKE_C_FLAGS_*`` but used by the linker when creating modules.
These flags will be used by the linker when creating a module for the
``<CONFIG>`` configuration.
.. include:: ../variable/include/LINKER_FLAGS.rst
See Also
^^^^^^^^
* :variable:`CMAKE_MODULE_LINKER_FLAGS`

View File

@@ -3,6 +3,12 @@ CMAKE_SHARED_LINKER_FLAGS
Linker flags to be used to create shared libraries.
These flags will be used by the linker when creating a shared library.
These flags will be used by the linker when creating a shared library for all
build configurations.
.. include:: ../variable/include/LINKER_FLAGS.rst
See Also
^^^^^^^^
* :variable:`CMAKE_SHARED_LINKER_FLAGS_<CONFIG>`

View File

@@ -3,7 +3,12 @@ CMAKE_SHARED_LINKER_FLAGS_<CONFIG>
Flags to be used when linking a shared library.
Same as ``CMAKE_C_FLAGS_*`` but used by the linker when creating shared
libraries.
These flags will be used by the linker when creating a shared library for the
``<CONFIG>`` configuration.
.. include:: ../variable/include/LINKER_FLAGS.rst
See Also
^^^^^^^^
* :variable:`CMAKE_SHARED_LINKER_FLAGS`