summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-05-26 13:27:15 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-05-26 13:27:23 (GMT)
commitb8449712a3fb87d63390a6b1802cd6b212a65aa3 (patch)
tree69c82876ae7fa7e8975b8344c029b8c359f5b5ae /Help
parenta3223bfa680e466108b937e9e07efba2744c3398 (diff)
parent023de565d33cdb095c0d5665e408493087e4d458 (diff)
downloadCMake-b8449712a3fb87d63390a6b1802cd6b212a65aa3.zip
CMake-b8449712a3fb87d63390a6b1802cd6b212a65aa3.tar.gz
CMake-b8449712a3fb87d63390a6b1802cd6b212a65aa3.tar.bz2
Merge topic 'implicit-link-dir-exclude'
023de565d3 Optionally exclude implicit link directories via environment Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Acked-by: Roscoe A. Bartlett <rabartl@sandia.gov> Merge-request: !8506
Diffstat (limited to 'Help')
-rw-r--r--Help/envvar/CMAKE_LANG_IMPLICIT_LINK_DIRECTORIES_EXCLUDE.rst13
-rw-r--r--Help/manual/cmake-env-variables.7.rst1
-rw-r--r--Help/variable/CMAKE_LANG_IMPLICIT_LINK_DIRECTORIES.rst7
3 files changed, 20 insertions, 1 deletions
diff --git a/Help/envvar/CMAKE_LANG_IMPLICIT_LINK_DIRECTORIES_EXCLUDE.rst b/Help/envvar/CMAKE_LANG_IMPLICIT_LINK_DIRECTORIES_EXCLUDE.rst
new file mode 100644
index 0000000..36c79fa
--- /dev/null
+++ b/Help/envvar/CMAKE_LANG_IMPLICIT_LINK_DIRECTORIES_EXCLUDE.rst
@@ -0,0 +1,13 @@
+CMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES_EXCLUDE
+----------------------------------------------
+
+.. versionadded:: 3.27
+
+.. include:: ENV_VAR.txt
+
+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.
diff --git a/Help/manual/cmake-env-variables.7.rst b/Help/manual/cmake-env-variables.7.rst
index f7ae94d..197e56e 100644
--- a/Help/manual/cmake-env-variables.7.rst
+++ b/Help/manual/cmake-env-variables.7.rst
@@ -50,6 +50,7 @@ Environment Variables that Control the Build
/envvar/CMAKE_GENERATOR_TOOLSET
/envvar/CMAKE_INSTALL_MODE
/envvar/CMAKE_LANG_COMPILER_LAUNCHER
+ /envvar/CMAKE_LANG_IMPLICIT_LINK_DIRECTORIES_EXCLUDE
/envvar/CMAKE_LANG_LINKER_LAUNCHER
/envvar/CMAKE_MSVCIDE_RUN_PATH
/envvar/CMAKE_NO_VERBOSE
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