On 2/28/2012 8:24 AM, Brad King wrote:
I replaced the FindPackage_ModeWarning topic on the stage with a
[snip]
However, I'm not yet prepared to merge this to next. I'm going to make more significant edits to the proposed changes and post them as a separate topic and then report back here.
I pushed new topic find_package-improve-messages that shares the beginning of FindPackage_ModeWarning but then makes slightly different changes: - I improved detection of options that conflict with MODULE. CONFIG and NO_MODULE are not the only conflicts. Other options imply Config mode too. - I added a test to check the major failure case message text by actually comparing it to known output. This is a stronger test than your FindPackageTest change and provides a reference for the message text of each case right in the source tree without running anything. - I decided to drop the warning for MODULE or CONFIG keywords without a sufficiently high minimum required CMake version. We don't warn for other commands that have new options, and the project could guard the use with its own test of the CMake version without actually bumping the min req version e.g. "if(NOT ${CMAKE_VERSION} VERSION_LESS 2.8.8)". We should not warn in such cases. - I changed the warning text and documentation text of the CMAKE_FIND_PACKAGE_WARN_NO_MODULE variable to change the tone from "less ambiguous" to "more specific." - I really don't want to ever warn in the default mode when falling back to Config mode. I think the new failure message text and explicit mode keywords are sufficient to solve this problem. Therefore CMAKE_FIND_PACKAGE_WARN_NO_MODULE will be required to get the warning and 2.8.8 will not warn by default. IMO this topic is ready to be merged to 'next' for testing. -Brad -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers