[CMake] cache variable prevents FIND_LIBRARY to be called again :/

Alan W. Irwin irwin at beluga.phys.uvic.ca
Wed Nov 1 16:29:06 EST 2006


On 2006-11-01 15:32-0500 Brad King wrote:

> Tristan Carel wrote:
>> Hi,
>>
>> The documentation of `FIND_LIBRARY' specify:
>> "Once one of these calls succeeds the result variable will be set and
>> stored in the cache so that neither call will search again."
>>
>> Is there a way to avoid this behavior? I've got a FIND_LIBRARY whose
>> search locations depends of the result of a EXECUTE_PROCESS so this
>> FIND_LIBRARY needs to be performed each time I run `configure'.
>>
>> Is there a way to remove an entry from the cache?
>
> It doesn't have to be removed from the cache.  The command should just
> not see the value loaded from it:
>
> SET(MYLIB)
> FIND_LIBRARY(MYLIB ...)

Tristan, this special treatment of the cache (false values can be
overwritten) for all the FIND_XXX commands was discussed in a recent thread
on this list.  This special FIND_XXX feature is not well known because it is
not documented in 2.4.3, but apparently there is documentation of it in the
CVS version of CMake that will turn into 2.4.4.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the
Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________


More information about the CMake mailing list