[cmake-developers] Review request: FindQt4-nonfatal-if-Qt5-found

Stephen Kelly steveire at gmail.com
Wed Oct 24 04:37:56 EDT 2012


David Cole wrote:
> On Tue, Oct 23, 2012 at 11:43 AM, Clinton Stimpson wrote:
>>
>> It looks like that branch removes the error if
>> find_package(Qt4 REQUIRED)
>> doesn't find Qt 4.x.  No?

Yes. The intention was to find a way for CMake to continue to look for Qt 4 
if it finds Qt 5 first. That doesn't seem to be possible.

>>
>> If it does remove the error, that seems wrong.  Is there another way to
>> avoid the error in the cmake unit tests? 
> 
> Yeah -- I don't think we should take this branch.
> 
> I think we should change callers to look for Qt5 first, and only do
> "find_package(Qt4)" if Qt5 is not found first...

Yes, that's the workaround.

What I was aiming for was to keep looking for Qt 4 if Qt 5 is found. While 
that works with Config files, it won't work if there's a Find module in the 
mix.

I wonder if a Find module which contains find_package(... NO_MODULE) would 
behave 'correctly'.

I've removed the branch from stage.

Thanks,

Steve.





More information about the cmake-developers mailing list