CheckLinkerFlag: Update documentation

- Added intro code block showing how to include this module.
- Added a list of variables that can affect the check. The
  CMAKE_REQUIRED_LINK_OPTIONS is skipped as it is currently internally
  overridden by the module's check command.
- Added examples section.
- Described command arguments as a list.
- Added included section describing the `LINKER:` (and `SHELL:`) prefix.
- Added link to the module in target_link_options() docs.
This commit is contained in:
Peter Kokot
2025-05-20 22:02:32 +02:00
parent 27f375d514
commit 4b0bce12c8
2 changed files with 128 additions and 18 deletions

View File

@@ -66,3 +66,6 @@ See Also
* :variable:`CMAKE_<LANG>_FLAGS` and :variable:`CMAKE_<LANG>_FLAGS_<CONFIG>`
add language-wide flags passed to all invocations of the compiler.
This includes invocations that drive compiling and those that drive linking.
* The :module:`CheckLinkerFlag` module to check whether a linker flag is
supported by the compiler.