Skip to content

Allow find_package to prefer Config mode. See issue #16805

Mel requested to merge MelDavis/cmake:find-package-prefer-config into master

Points of interest:

  • The existing variable CMAKE_FIND_PACKAGE_WARN_NO_MODULE is ignored when CMAKE_FIND_PACKAGE_PREFER_CONFIG is TRUE because one variable states you want to enforce an explicit mode and the other states you want to use an implicit mode.
  • The note about <pkg>Config.cmake result variables is included in the variable's help page.
  • I did not rebuild the help files when testing so please review the doc changes carefully.

Merge request reports