summaryrefslogtreecommitdiffstats
path: root/Help/variable
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-05-25 15:59:26 (GMT)
committerBrad King <brad.king@kitware.com>2023-05-25 17:42:58 (GMT)
commit023de565d33cdb095c0d5665e408493087e4d458 (patch)
tree8f52e06801201ec59cb11dab088dbd9a289f1be2 /Help/variable
parentcf7b7600c669ea162e0c3960c3e4e3a5d04f3274 (diff)
downloadCMake-023de565d33cdb095c0d5665e408493087e4d458.zip
CMake-023de565d33cdb095c0d5665e408493087e4d458.tar.gz
CMake-023de565d33cdb095c0d5665e408493087e4d458.tar.bz2
Optionally exclude implicit link directories via environment
A misconfigured compiler may pass extraneous implicit link directories to its linker. If they are in `CMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES`, CMake may generate extra `-L` flags on mixed-language link lines that break linking. Add an environment variable that users can set to work around such misconfiguration of their compilers.
Diffstat (limited to 'Help/variable')
-rw-r--r--Help/variable/CMAKE_LANG_IMPLICIT_LINK_DIRECTORIES.rst7
1 files changed, 6 insertions, 1 deletions
diff --git a/Help/variable/CMAKE_LANG_IMPLICIT_LINK_DIRECTORIES.rst b/Help/variable/CMAKE_LANG_IMPLICIT_LINK_DIRECTORIES.rst
index 081c4da..7e008df 100644
--- a/Help/variable/CMAKE_LANG_IMPLICIT_LINK_DIRECTORIES.rst
+++ b/Help/variable/CMAKE_LANG_IMPLICIT_LINK_DIRECTORIES.rst
@@ -6,9 +6,14 @@ Implicit linker search path detected for language ``<LANG>``.
Compilers typically pass directories containing language runtime
libraries and default library search paths when they invoke a linker.
These paths are implicit linker search directories for the compiler's
-language. For each language enabled by the :command:`project` or
+language.
+
+For each language enabled by the :command:`project` or
:command:`enable_language` command, CMake automatically detects these
directories and reports the results in this variable.
+The :envvar:`CMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES_EXCLUDE` environment
+variable may be set to exclude specific directories from the automatically
+detected results.
When linking to a static library, CMake adds the implicit link directories
from this variable for each language used in the static library (except