[CMake] Re: Re: Re: FindQt4 in 2.4.8 bug
Fernando Cacciola
fernando.cacciola at gmail.com
Fri Feb 1 13:37:53 EST 2008
Hi Hendrik,
> Quoting Bill Hoffman
> <bill.hoffman at kitware.com>:
>> OK, I get it now... So, the FIND_* stuff will set a value if it is
>> NOTFOUND. However, the set command will not. I am thinking it should.
>> I am not sure what that will break, but it would be consistent with
>> FIND_*.
>>
>> This should not be a problem if you start from a clean build tree for
>> FindQt4.cmake, as QT_INCLUDE_DIR will never get put in the cache as
>> NOTFOUND by the current FindQt4.cmake. So, I think this is something
>> we can fix in CMake 2.6. Feel free to create a feature request, "set
>> CACHE should set NOTFOUND variables".
>
> Let's say a library is optional. A current script cannot see the
> difference anymore between "library not found on earlier run" and "I did
> not search for it, yet"
>
And that is meaningully different because?
>. SET is well-documented about CACHE and FORCE behaviour. Don't break that
>as you can always use
> if (NOT DEFINED VAR)
> set (VAR "foo" CACHE ...... FORCE)
>
*you* as in *me* in any *new* script?
Sure I can, but I found this problem in FindQt4, a standard cmake module.
Do you suggest to go through all the standard modules and fix them like
that?
Best
Fernando
More information about the CMake
mailing list