Ryan Prichard | f6283ab | 2022-01-13 17:30:19 -0800 | [diff] [blame] | 1 | CMAKE_LINK_SEARCH_END_STATIC |
| 2 | ---------------------------- |
| 3 | |
| 4 | .. versionadded:: 3.4 |
| 5 | |
| 6 | End a link line such that static system libraries are used. |
| 7 | |
| 8 | Some linkers support switches such as ``-Bstatic`` and ``-Bdynamic`` to |
| 9 | determine whether to use static or shared libraries for ``-lXXX`` options. |
| 10 | CMake uses these options to set the link type for libraries whose full |
| 11 | paths are not known or (in some cases) are in implicit link |
| 12 | directories for the platform. By default CMake adds an option at the |
| 13 | end of the library list (if necessary) to set the linker search type |
| 14 | back to its starting type. This property switches the final linker |
| 15 | search type to ``-Bstatic`` regardless of how it started. |
| 16 | |
| 17 | This variable is used to initialize the target property |
| 18 | :prop_tgt:`LINK_SEARCH_END_STATIC` for all targets. If set, its |
| 19 | value is also used by the :command:`try_compile` command. |
| 20 | |
| 21 | See also :variable:`CMAKE_LINK_SEARCH_START_STATIC`. |