diff options
author | Cristian Adam <cristian.adam@gmail.com> | 2019-05-20 19:32:24 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-05-21 14:29:47 (GMT) |
commit | 26a99da206526efb203d0e448d7e095a07bec2fd (patch) | |
tree | 45d75b3710bdae0bc373993c2ad47788ce70cdb7 /Help/command | |
parent | c365243a3a282523062b5378898aa4fe6436f8fb (diff) | |
download | CMake-26a99da206526efb203d0e448d7e095a07bec2fd.zip CMake-26a99da206526efb203d0e448d7e095a07bec2fd.tar.gz CMake-26a99da206526efb203d0e448d7e095a07bec2fd.tar.bz2 |
find_package: Add option to prefer Config mode
Add a `CMAKE_FIND_PACKAGE_PREFER_CONFIG` variable to tell
`find_package` calls to look for a package configuration file
first even if a find module is available.
Fixes: #16805, #19236
Diffstat (limited to 'Help/command')
-rw-r--r-- | Help/command/find_package.rst | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Help/command/find_package.rst b/Help/command/find_package.rst index eb44eb2..e5e5b2c 100644 --- a/Help/command/find_package.rst +++ b/Help/command/find_package.rst @@ -59,6 +59,13 @@ for finding the package, checking the version, and producing any needed messages. Some find-modules provide limited or no support for versioning; check the module documentation. +If the ``MODULE`` option is not specfied in the above signature, +CMake first searches for the package using Module mode. Then, if the +package is not found, it searches again using Config mode. A user +may set the variable :variable:`CMAKE_FIND_PACKAGE_PREFER_CONFIG` to +``TRUE`` to direct CMake first search using Config mode before falling +back to Module mode. + Full Signature and Config Mode ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |