Le Sun, 09 Nov 2008 17:55:12 -0500,
Bill Hoffman <[EMAIL PROTECTED]> a écrit :
> 2. CMake needs a way to easily chain variables together so that you
> can clear stuff out if a dependent variable is changed by the user.
> So, if you have MY_PATH_TO_TOOL=/path/to/tool, and it changes to
> /new/path/to/tool, then all the libraries that where found using
> MY_PATH_TO_TOOL should be reset and rediscovered. Currently, this is
> done ad-hoc in CMake, for example Clinton just added something to the
> FindQt4 that will reset all the qt variables if the qmake one is
> changed. However, this issue has come up more than once and needs a
> more consistent API for dealing with the issue.
That's a very good idea.
May be adding a DEPENDS option to SET would be nice.
SET(MYLIB "${MY_PATH_TO_TOOL}/whatever/lib" DEPENDS MY_PATH_TO_TOOL)
then MYLIB is explicitely linked with MY_PATH_TO_TOOL such
that if MY_PATH_TO_TOOL is reset or change CMake knows MYLIB
should be deleted from cache or unset.
Note that somehow "direct" dependency like that may even be
added by CMake automatically since "${MY_PATH_TO_TOOL}/whatever/lib"
does contains a ${MY_PATH_TO_TOOL} expansion.
--
Erk
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake