On 08/29/2017 05:28 PM, Robert Dailey wrote:
> One other thing: Is there a way to make find_package() default to
> CONFIG mode? Right now it seems to search MODULE first, then CONFIG.
> But right now the only way to enable config is to explicitly use the
> CONFIG option or make sure CMake can't find a find module by
> manipulating CMAKE_MODULE_PATH.

It only searches in one mode.  The presence or non-presence of a
find module in CMAKE_MODULE_PATH is the way the mode is selected
if an explicit CONFIG option is not given.  There is an issue
about this here:

 https://gitlab.kitware.com/cmake/cmake/issues/16805

with an unfinished/expired MR:

 https://gitlab.kitware.com/cmake/cmake/merge_requests/768

Some find modules call `find_package(MyPackage CONFIG ...)` as
their first step if the external package may be found by either
method.

-Brad
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to