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

Alan W. Irwin irwin at beluga.phys.uvic.ca
Fri Nov 3 14:04:11 EST 2006


On 2006-11-01 16:39-0500 Tristan Carel wrote:

> On 11/1/06, Tristan Carel <tristan.carel at gmail.com> wrote:
>> On 11/1/06, Brad King <brad.king at kitware.com> wrote:
>> > SET(MYLIB)
>> > FIND_LIBRARY(MYLIB ...)
>> 
>> It doesn't seem to work, the cache value is not updated.
> Ok it works if I set
>
> SET(PYTHON_LIBRARIES PYTHON_LIBRARIES-NOTFOUND)
>
> which is logic!
>
> Thanks to Brad & Alan

Brad, would it be easier to treat all FALSE values the same way (as you
assumed above)?

What I mean by FALSE is the same things the IF(NOT variable) considers to
be TRUE.  According to the documentation that is

"IF(NOT variable)

        True if the variable's value is empty, 0, N, NO, OFF, FALSE, NOTFOUND,
        or <variable>-NOTFOUND."

As you found out, it can be confusing if FIND_XXX makes distinctions between
these various kinds of FALSE values.  Whatever the final decision on this
issue, please make sure the documentation reflects that decision.

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