Miguel A. Figueroa-Villanueva wrote:
es.
- Add an easy way to create dependent cache variables, that when changed
unset a number of other variables.
A while back I had opened a feature request on the third item:
http://public.kitware.com/Bug/view.php?id=7286
I think it is a fairly simple thing to implement if no speed issues
are considered, which I don't think these would be a problem. That is,
save the cache before the configure iteration and check if the entries
listed in the dependencies list have changed. If so, reset the cache
entry.
I am not sure I understand how your DEPEND keyword would work?
BTW, this type of thing can be done by using two cache variables right
now. For example from FindQt4.cmake:
IF(QT_QMAKE_EXECUTABLE_LAST AND NOT QT_QMAKE_EXECUTABLE_LAST MATCHES
"^${QT_QMAKE_EXECUTABLE}$")
SET(QT_QMAKE_CHANGED 1)
ENDIF(QT_QMAKE_EXECUTABLE_LAST AND NOT QT_QMAKE_EXECUTABLE_LAST
MATCHES "^${QT_QMAKE_EXECUTABLE}$")
SET(QT_QMAKE_EXECUTABLE_LAST "${QT_QMAKE_EXECUTABLE}" CACHE INTERNAL
"" FORCE)
I think what is needed is a more general way to add dependent cache
variables.
check_cache_depend(VAR1 DVAR1 DVAR2 DVAR3 DVAR4)
If VAR1 changes in the cache from a previous value, then DVAR1, DVAR2,
DVAR3, and DVAR4 are all removed from the cache. You would put
something like that at the top of a FindFoo.cmake module. For Qt it
would be:
check_cache_depend(QT_QMAKE_EXECUTABLE QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR
QT_QTDESIGNERCOMPONENTS_LIBRARY_RELEASE
...)
-Bill
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake