On 04/16/2015 05:54 AM, Tamás Kenéz wrote: >> I think the main challenge will be how to format error messages when >> neither mode finds anything for a REQUIRED package. > > We can pretend they failed in the usual module;config order. So the > wordings of the messages may remain as they are.
The current message says: By not providing Find<pkg>.cmake in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file ... If someone sets CMAKE_FIND_PACKAGE_CONFIG_FIRST then that is what asked CMake to find a package configuration file even if the project does provide Find<pkg>.cmake in CMAKE_MODULE_PATH. Therefore new wording will be needed in this case. It should still depend on whether the find module was available. > We should however think about what to do when > CMAKE_FIND_PACKAGE_WARN_NO_MODULE is ON and both modes are enabled > (and we're in CONFIG_FIRST mode). Should we check the missing > find-module *after* we've found a config-module and print the warning? > > I think no, because the user has explicitly expressed the preference > towards the CONFIG mode by specifying CONFIG_FIRST (either as a > find_package option or as CMAKE_FIND_PACKAGE_CONFIG_FIRST). Agreed. We can always add such a warning in the future. > About the proposed change: The feature request proposes two ways to > enable the CONFIG_FIRST mode: a new option for the find_package and a > global variable (which I think should be called > CMAKE_FIND_PACKAGE_CONFIG_FIRST). > > I think the find_package option is less important since the same > effect can be achieved by creating a custom > find_package_config_first() macro. If the functionality is implemented through either interface it will be easy to add the other, so I think they can just both be added together. Are you interested in working on a patch for this? Thanks, -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
