summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-01-21 12:47:22 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-01-21 12:47:29 (GMT)
commitd1aa2e11092acdcc22b333e219187026d38549a5 (patch)
treeeaba8a9e22decb92d4af7427667ec5e07fe0fe87 /Help
parentfefae527c8c54d249c44313d9b09cdb0157e2f5d (diff)
parentb773e58099b2fc8ebdf8319172fb018d0139396d (diff)
downloadCMake-d1aa2e11092acdcc22b333e219187026d38549a5.zip
CMake-d1aa2e11092acdcc22b333e219187026d38549a5.tar.gz
CMake-d1aa2e11092acdcc22b333e219187026d38549a5.tar.bz2
Merge topic 'find-package-resolve-symlinks'
b773e58099 find_package: add test coverage for CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS a5e948a36f find_package: optionally resolve symlinks when discovering packages Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2798
Diffstat (limited to 'Help')
-rw-r--r--Help/command/find_package.rst5
-rw-r--r--Help/manual/cmake-variables.7.rst1
-rw-r--r--Help/release/dev/find-package-resolve-symlinks.rst6
-rw-r--r--Help/variable/CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS.rst10
4 files changed, 22 insertions, 0 deletions
diff --git a/Help/command/find_package.rst b/Help/command/find_package.rst
index cafef8c..54d5f68 100644
--- a/Help/command/find_package.rst
+++ b/Help/command/find_package.rst
@@ -354,6 +354,11 @@ enabled.
.. include:: FIND_XXX_ROOT.txt
.. include:: FIND_XXX_ORDER.txt
+By default the value stored in the result variable will be the path at
+which the file is found. The :variable:`CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS`
+variable may be set to ``TRUE`` before calling ``find_package`` in order
+to resolve symbolic links and store the real path to the file.
+
Every non-REQUIRED ``find_package`` call can be disabled by setting the
:variable:`CMAKE_DISABLE_FIND_PACKAGE_<PackageName>` variable to ``TRUE``.
diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst
index e4bd8a0..bd6a58f 100644
--- a/Help/manual/cmake-variables.7.rst
+++ b/Help/manual/cmake-variables.7.rst
@@ -170,6 +170,7 @@ Variables that Change Behavior
/variable/CMAKE_FIND_NO_INSTALL_PREFIX
/variable/CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY
/variable/CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY
+ /variable/CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS
/variable/CMAKE_FIND_PACKAGE_WARN_NO_MODULE
/variable/CMAKE_FIND_ROOT_PATH
/variable/CMAKE_FIND_ROOT_PATH_MODE_INCLUDE
diff --git a/Help/release/dev/find-package-resolve-symlinks.rst b/Help/release/dev/find-package-resolve-symlinks.rst
new file mode 100644
index 0000000..7adb9fe
--- /dev/null
+++ b/Help/release/dev/find-package-resolve-symlinks.rst
@@ -0,0 +1,6 @@
+find-package-resolve-symlinks
+-----------------------------
+
+* The :command:`find_package` command learned to optionally resolve
+ symbolic links in the paths to package configuration files.
+ See the :variable:`CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS` variable.
diff --git a/Help/variable/CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS.rst b/Help/variable/CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS.rst
new file mode 100644
index 0000000..dfbde20
--- /dev/null
+++ b/Help/variable/CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS.rst
@@ -0,0 +1,10 @@
+CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS
+-----------------------------------
+
+Set to ``TRUE`` to tell :command:`find_package` calls to resolve symbolic
+links in the value of ``<PackageName>_DIR``.
+
+This is helpful in use cases where the package search path points at a
+proxy directory in which symlinks to the real package locations appear.
+This is not enabled by default because there are also common use cases
+in which the symlinks should be preserved.