[Cmake] Issues and new ideas
Bill Hoffman
bill.hoffman at kitware.com
Thu May 10 14:25:13 EDT 2001
I was thinking more along these lines:
FIND_LIBRARY(LIB_PATH foobar)
IF(LIB_PATH) - succeds if not (IGNORE or NOTFOUND, or empty)
do something
ENDIF(LIB_PATH)
At 02:09 PM 5/10/2001 -0400, Amitha Perera wrote:
>> 2. A third state will be added as a possible cache value.
>> NOTFOUND, IGNORE, or VALUE.
>
>There'll need to be an corresponding extension to the IF command. I
>suggest the third state be called "UNSET" or something like that:
> IF(HAS_LIB) - succeeds if HAS_LIB is not "UNSET" and is not "NO"
> ("NOTFOUND", "FALSE", "0" and other negatives)
> IF(NOT HAS_LIB) - not( above )
> IF(SET HAS_LIB) - succeeds if HAS_LIB is not "UNSET"
> IF(NOTSET HAS_LIB) - for convenience
>
>Using the variable:
>
>IF(HAS_LIB)
> do something with it
>ENDIF(HAS_LIB)
>
>In the FindLib module:
>
>IF(NOTSET HAS_LIB)
> SET( HAS_LIB "NO" CACHE )
> FIND_LIBRARY(LIB_PATH...)
> IF(LIB_PATH)
> SET( HAS_LIB "YES" CACHE )
> ENDIF(LIB_PATH)
>ENDIF(NOTSET HAS_LIB)
More information about the CMake
mailing list