[CMake] Misleading error message when enforcing version from foo-config-version.cmake

Brad King brad.king at kitware.com
Wed Aug 4 11:34:12 EDT 2010


On 08/04/2010 11:30 AM, Brad King wrote:
>> find_package(Foo 6.6.6 REQUIRED NO_MODULE)
>>
>> and 6.6.6 is a non-valid version (i.e., PACKAGE_VERSION_COMPATIBLE is
>> set to FALSE in foo-config-version.cmake), then I get the error message
>> that foo-config.cmake is not found, instead of something related to the
>> request of an incompatible version.
> 
> IMO there is no difference between finding incompatible versions
> and no versions at all.  The required package is not present.

Oops, I hit send too soon.

I meant to add that the default message should be reworded when
a version has been requested.  The user reading the message should
be told what version he/she needs to find.  Take a look at the
source under Source/cmFindPackageCommand.cxx and send a proposed
patch.

Thanks,
-Brad


More information about the CMake mailing list