[Cmake] Issues and new ideas
Amitha Perera
perera at cs.rpi.edu
Thu May 10 14:09:34 EDT 2001
> 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