mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-08-02 11:02:46 +08:00
CMake detects libraries that the compiler driver implicitly passes to the linker, and stores them in `CMAKE_<LANG>_IMPLICIT_LINK_LIBRARIES` for use in constructing mixed-language link lines. Some compiler driver flags add implicitly linked libraries that should not be used during mixed-language linking because they are handled by similar flags passed to the other language's compiler driver. Add an environment variable that users can set to avoid undesired implicit link libraries in such scenarios. Follow the pattern from commit 023de565d3 (Optionally exclude implicit link directories via environment, 2023-05-25, v3.27.0-rc1~54^2). Fixes: #26911
17 lines
588 B
ReStructuredText
17 lines
588 B
ReStructuredText
CMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES_EXCLUDE
|
|
----------------------------------------------
|
|
|
|
.. versionadded:: 3.27
|
|
|
|
.. include:: include/ENV_VAR.rst
|
|
|
|
A :ref:`semicolon-separated list <CMake Language Lists>` of directories
|
|
to exclude from the :variable:`CMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES`
|
|
variable when it is automatically detected from the ``<LANG>`` compiler.
|
|
|
|
This may be used to work around misconfigured compiler drivers that pass
|
|
extraneous implicit link directories to their linker.
|
|
|
|
See also the :envvar:`CMAKE_<LANG>_IMPLICIT_LINK_LIBRARIES_EXCLUDE`
|
|
environment variable.
|