[CMake] Re: FindQt4 in 2.4.8 bug

Fernando Cacciola fernando.cacciola at gmail.com
Fri Jan 25 15:33:37 EST 2008


Fernando Cacciola wrote:
> Hi,
>
> I've been using 2.4.7 until this morning when I saw the 2.4.8 announcement
> and jumped right away to install it (silly me).
>
> I have some script that finds Qt4 but stopped working on 2.4.8.
>
> Tracing the problem in FindQt4.cmake I found this...
>
> There is one (at least one) SET command like this:
>
>     SET( QT_INCLUDE_DIR ${qt4_include_dir} CACHE PATH "")
>
> which fails to actually set the value of QT_INCLUDE_DIR
>
> It works fine if DOCSTRING is prepended in front of  "":
>
> SET( QT_INCLUDE_DIR ${qt4_include_dir} CACHE PATH DOCSTRING "")
>
I just realized that the trailing "" in the original is the DOCSTRING 
already.

My version works because the presence of my own trailing "" causes the set 
command not to parse CACHE correctly, so it just adds "CACHE", "PATH" and 
"DOCSTRING" to the variable (whith the value of qt4_include_dir as the first 
element on the list)

Since that showned that this behaviour is related to caching the just 
assigned value in the cache, I tried simply adding FORCE at the end, and it 
worked.

Removing the cache still doesn't help unless I add FORCE, so is not an issue 
caused by a previous value.
Running the script a second time (so the cache contains 
"QT_INCLUDE_DIR-NOT_FOUND") still doesn't change anything.

Any ideas?


-- 
Fernando Cacciola
SciSoft
http://fcacciola.50webs.com 




More information about the CMake mailing list